{ "info": { "author": "Kaan Mertol", "author_email": "kmertol@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Topic :: Utilities" ], "description": "Geocell\n=======\n\nThe *Google Maps Geolocation API* actually lets you define multiple gsm\ncell towers into its request. But it will just return the location and\naccuracy based on the first cell(serving cell), doing nothing meaningful\nabout the neighbour cells, rssi and timing advance values.\n\nSo this is an attempt to do something a bit more meaningful...\n\nInstallation\n------------\n\nUse pip:\n\n::\n\n pip install geocell\n\nOr clone the repo and:\n\n::\n\n pip setup.py install\n\nSetting your Google Maps API Key\n--------------------------------\n\nThe key will be used in:\n\n- *Google Maps Geolocation API* for requesting cell locations\n- *Google Maps Javascript API* for drawing maps\n\nIf you don't have a google maps api key. Go\n`here `__\nand follow the instructions to get your key.\n\nSet your api key using either of the following methods:\n\n- Set your key as the ``GOOGLE_MAPS_API_KEY`` environment variable\n- ``import geocell`` then ``geocell.api_key=\"\"``\n\nUsage\n-----\n\nSimple location request\n~~~~~~~~~~~~~~~~~~~~~~~\n\n.. code:: python\n\n >>> import geocell\n >>> sample_cell = {\"mnc\":2,\"mcc\":286,\"cid\":51861,\"lac\":54110}\n >>> geocell.locate(sample_cell)\n {'location': {'lat': 40.7018889, 'lng': 29.8912834}, 'accuracy': 3250.0}\n\nLocation Estimation\n~~~~~~~~~~~~~~~~~~~\n\nWe need the rssi values and multiple cell information to make an\nestimation\n\n.. code:: python\n\n >>> sample_cells = [\n ... {\"rssi\":-82,\"mnc\":2,\"mcc\":286,\"cid\":51861,\"lac\":54110},\n ... {\"rssi\":-85,\"mnc\":2,\"mcc\":286,\"cid\":16116,\"lac\":54110},\n ... {\"rssi\":-93,\"mnc\":2,\"mcc\":286,\"cid\":0,\"lac\":54108},\n ... {\"rssi\":-94,\"mnc\":2,\"mcc\":286,\"cid\":38344,\"lac\":54110},\n ... {\"rssi\":-97,\"mnc\":2,\"mcc\":286,\"cid\":52555,\"lac\":54110},\n ... {\"rssi\":-98,\"mnc\":2,\"mcc\":286,\"cid\":51857,\"lac\":54108},\n ... {\"rssi\":-99,\"mnc\":2,\"mcc\":286,\"cid\":39684,\"lac\":54110}\n ... ]\n >>> geocell.estimate(sample_cells)\n {'location': {'lat': 40.70356939393244, 'lng': 29.88564243119295}, 'accuracy': 251.3839360809747}\n\n.. NOTE::\n\n You will notice that this function takes couple of seconds to\n return, the reason is that the *Google Maps Geolocation API*\n requests take some time. But the cell requests are cached internally\n in the module so the next time you request the same cell, the value\n will be returned instantly. If you like, you can also set\n ``geocell.is_multiprocess = True`` to do multiple requests, just\n don't use multiprocessing inside a interpreter, it doesn't like it.\n\nLet's see it in action now:\n\n.. code:: python\n\n >>> geocell.estimate(sample_cells, \"map.html\")\n {'location': {'lat': 40.70356939393244, 'lng': 29.88564243119295}, 'accuracy': 251.38393\n 60809747}\n\nLooking at the generated map:\n\n- **Light yellow circle** is the serving cell\n- **Red colored** are the neighbour cells\n- **The blue lines** are the flight path showing estimation done at\n each step. Starting point of the flight path is the center of the\n serving cell\n- **The marker** shows the end of the flight path and the last\n estimated location\n\n.. figure:: https://cloud.githubusercontent.com/assets/3398029/18313982/d0a5a9a0-7519-11e6-99e3-70743cffdf78.jpg\n :alt: all\n\n\nLet's take a closer look:\n\n.. code:: python\n\n >>> geocell.estimate(sample_cells, \"map_estimate.html\", cell_display=\"estimate\")\n {'location': {'lat': 40.70356939393244, 'lng': 29.88564243119295}, 'accuracy': 251.38393\n 60809747}\n\nNow the map shows only the estimated location(marker) and estimated\naccuracy(radius). The arrow points to the actual location.\n\n.. figure:: https://cloud.githubusercontent.com/assets/3398029/18313986/d32f370e-7519-11e6-9250-6ae622daf013.jpg\n :alt: estimate", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/kmertol/geocell", "keywords": "geolocation location cell", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "geocell", "package_url": "https://pypi.org/project/geocell/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/geocell/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/kmertol/geocell" }, "release_url": "https://pypi.org/project/geocell/0.9.0/", "requires_dist": null, "requires_python": null, "summary": "Location estimation using GSM Cells with Google Maps Geolocation API", "version": "0.9.0" }, "last_serial": 2331186, "releases": { "0.9.0": [ { "comment_text": "", "digests": { "md5": "8f51d0e40a10436546caa151b185ddb1", "sha256": "694d89cb85a4338faf8cb0f95dad1c49f28c1c50977e574261c8a9d878efdbe5" }, "downloads": -1, "filename": "geocell-0.9.0.zip", "has_sig": false, "md5_digest": "8f51d0e40a10436546caa151b185ddb1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12287, "upload_time": "2016-09-08T10:57:06", "url": "https://files.pythonhosted.org/packages/a0/79/d22ae28e23eec2a6c96cf0a2799bc67c737cc2e5684c6a913b96373ee356/geocell-0.9.0.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8f51d0e40a10436546caa151b185ddb1", "sha256": "694d89cb85a4338faf8cb0f95dad1c49f28c1c50977e574261c8a9d878efdbe5" }, "downloads": -1, "filename": "geocell-0.9.0.zip", "has_sig": false, "md5_digest": "8f51d0e40a10436546caa151b185ddb1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12287, "upload_time": "2016-09-08T10:57:06", "url": "https://files.pythonhosted.org/packages/a0/79/d22ae28e23eec2a6c96cf0a2799bc67c737cc2e5684c6a913b96373ee356/geocell-0.9.0.zip" } ] }