{ "info": { "author": "Gabriel Coimbra", "author_email": "gcoimbra@riseup.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: GNU Affero General Public License v3", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3" ], "description": "# Project Title\n\nAPPEL: A faster spatial join/reverse geocoding threaded algorithm\n\n## Getting Started\n\n\nSpatial joins are like common relational database joins, just for geographic data. \nIn general, we have a set of coordinates and we want to know which point is in which polygon, this operation is described as reverse geocoding.\nThe algorithm relies on standard Point-In-Polygon operations but tends to minimize then.\n\nAPPEL proposes a new way to spatial joins that promises to be faster than than trivial brute force and R-Tree implementation of PostGIS and GeoPandas.\nFor a million points it takes about 14 seconds to finish locating, while PostGIS takes about 7 minutes and GeoPandas takes 1 minutes and 7 seconds. \nAll on the same machine.\n\nTo do so, the polygons to be searched are organized through a tree. The tree levels are predefined based on states, mesoregions, microregions and municipalities.\nIn addition, it is considered that the geographic points provided by users are more likely to be located in more populated regions.\nTherefore, these areas are sorted to be the first to be found at each level of the tree. \n\nCurrently, the systems works only for Brazil territory and locates the cities of each point.\nBut it's principle is extensible for any geographical region.\nYou'll need just a shapefile (or equivalent) with each region and subregions population to build the data structure.\n\n\nThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.\n\n### Prerequisites\n\n```\nPython 3.6\nGeoPandas\nNumpy\nShapely\n```\n\n### Installing\n\nA step by step series of examples that tell you how to get a development env running\nJust use pip.\n\n```\npip install appel\n```\nBy default, it comes with a tree for Brazil's regions.\n\nTo use, you must input the longitude and latitudes in the query function:\n```\nfrom numpy import array\n\nfrom appel.searchtree import SearchTree\n\nsearch = SearchTree()\n\nlongitudes = array([2.748047, -20.890625], dtype='float32')\nlatitudes = array([-63.03125, -49.53125], dtype='float32')\nresults = search.query(longitudes, latitudes)\nprint(results)\n\n```\n\nIt will return a dataframe with latitudes longitudes and the city id.\n\n## Running the tests\n\nJust run methods on the classes of test package.\n\n## Built With\n\n* [GeoPandas](http://geopandas.org/) - Essential for reading shapely files and build the search data structure.\n* [Shapely](https://github.com/Toblerity/Shapely) - vectorized contains function is the core of the search algorithm.\n\n## Contributing\n\nCurrently I don't have a fixed system. Use issues for critics, help or any question in general.\n\n## Authors\n\n* **Gabriel Coimbra** - [gcoimbra](https://github.com/gcoimbra/)\n\n## License\n\nThis project is licensed under the GNU Affero General Public License - see the [LICENSE.md](LICENSE.md) file for details\n\n## Acknowledgments\nThanks [PurpleBooth](https://gist.github.com/PurpleBooth) for this [README.md](https://gist.github.com/PurpleBooth/109311bb0361f32d87a2) template.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/gcoimbra/appel", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "appel-geocode", "package_url": "https://pypi.org/project/appel-geocode/", "platform": "", "project_url": "https://pypi.org/project/appel-geocode/", "project_urls": { "Homepage": "https://github.com/gcoimbra/appel" }, "release_url": "https://pypi.org/project/appel-geocode/1.1.0/", "requires_dist": [ "matplotlib (==3.1.1)", "Shapely (==1.6.4.post2)", "geopandas (==0.5.1)", "numpy (==1.17.2)", "pandas (==0.25.1)", "typing-extensions (==3.7.4)" ], "requires_python": ">=3.6", "summary": "A faster spatial join/reverse geocoding algorithm", "version": "1.1.0" }, "last_serial": 5876554, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "8b9bf2562d7a6c6f5edbe6f42fc85b4a", "sha256": "752f8cdde59cb6fad2c57824462e226e879fd1efcb9fc0f58531ce20f26231b6" }, "downloads": -1, "filename": "appel_geocode-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "8b9bf2562d7a6c6f5edbe6f42fc85b4a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 15002, "upload_time": "2019-09-23T19:01:57", "url": "https://files.pythonhosted.org/packages/01/c7/59717551604c7e26a64635ecea91aff8c6417a2d480a7132fdaf93cc0875/appel_geocode-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1b7d92166be9df20b071d7e824f15c0f", "sha256": "c1ed6178a9f2b1d95630fea288460550a387283c8f72b2b81e68b42b37a33a7f" }, "downloads": -1, "filename": "appel_geocode-0.1.1.tar.gz", "has_sig": false, "md5_digest": "1b7d92166be9df20b071d7e824f15c0f", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 23877, "upload_time": "2019-09-23T19:02:00", "url": "https://files.pythonhosted.org/packages/96/95/6de99135f30f5a8d1af38dd6ed29c12e0722cdf3f52da6d642efa1239865/appel_geocode-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "34df11969c03126b7602b33c9ba34497", "sha256": "43ecc85cb1f6b1821b07654eededbb7a47b760e796b148245326015e92c90bf7" }, "downloads": -1, "filename": "appel_geocode-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "34df11969c03126b7602b33c9ba34497", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 25251, "upload_time": "2019-09-23T19:03:06", "url": "https://files.pythonhosted.org/packages/0a/10/07c4f8d09ad2256eeb5aa9a19bb2ea9b176beb77926506f9697a028f9d42/appel_geocode-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cd03cc41e6f6fffc753ce89adc477441", "sha256": "a6fb41c804e321026e2438aeb635aa5c622a3eaa0798424d9113ab184f9a036f" }, "downloads": -1, "filename": "appel_geocode-0.1.2.tar.gz", "has_sig": false, "md5_digest": "cd03cc41e6f6fffc753ce89adc477441", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 5067600, "upload_time": "2019-09-23T19:03:13", "url": "https://files.pythonhosted.org/packages/b8/61/436423423cebe4bcd0798616e03627690335639565f48bb8cf396a71349a/appel_geocode-0.1.2.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "ae44043d10fbf7a892c6037c72e34dfd", "sha256": "326c3931d434c3b0960969ea7f1c2f3433ea4be758b47d42e0ae203d5b449a6f" }, "downloads": -1, "filename": "appel_geocode-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "ae44043d10fbf7a892c6037c72e34dfd", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 19231, "upload_time": "2019-09-23T19:21:08", "url": "https://files.pythonhosted.org/packages/c9/60/f79d3ba94a0604f7fef3276fd5f22ebc127eac402fa6b23ef31c75ec6c6a/appel_geocode-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "96c0d0b413e166488cf4bb72eda13a9f", "sha256": "3688efbe8ea5984957ef5324ee5d05982d207a5f7bf05ddb049e83a798ce94e6" }, "downloads": -1, "filename": "appel_geocode-1.0.0.tar.gz", "has_sig": false, "md5_digest": "96c0d0b413e166488cf4bb72eda13a9f", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 5062108, "upload_time": "2019-09-23T19:21:15", "url": "https://files.pythonhosted.org/packages/6d/23/a6392b1cbe554b826645861158f656508b2b9c32d923d6adf58fdfb881a4/appel_geocode-1.0.0.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "c6bdf1fc61bbdc2a3bf448017bc79b84", "sha256": "32655d3d7ee43e4fa6c905356b0548a4096a63546c6c86933d89598e39965980" }, "downloads": -1, "filename": "appel_geocode-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "c6bdf1fc61bbdc2a3bf448017bc79b84", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 19230, "upload_time": "2019-09-23T23:10:47", "url": "https://files.pythonhosted.org/packages/76/60/59d3d11590d5fe174e9bee9decd5a666696aadf2568f0aa48c4c8dbc4efc/appel_geocode-1.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6df316f6a29c2067862a55492d27f8e3", "sha256": "0caa3e6e0536b7f6eafacd85da404ce8858653647795e1b7ae544c28d87afefb" }, "downloads": -1, "filename": "appel_geocode-1.1.0.tar.gz", "has_sig": false, "md5_digest": "6df316f6a29c2067862a55492d27f8e3", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 5062118, "upload_time": "2019-09-23T23:12:11", "url": "https://files.pythonhosted.org/packages/64/d7/a0408de4dc25f4fb93b0a9289ddb6b148c5d61444615d56206ac9d482107/appel_geocode-1.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c6bdf1fc61bbdc2a3bf448017bc79b84", "sha256": "32655d3d7ee43e4fa6c905356b0548a4096a63546c6c86933d89598e39965980" }, "downloads": -1, "filename": "appel_geocode-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "c6bdf1fc61bbdc2a3bf448017bc79b84", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 19230, "upload_time": "2019-09-23T23:10:47", "url": "https://files.pythonhosted.org/packages/76/60/59d3d11590d5fe174e9bee9decd5a666696aadf2568f0aa48c4c8dbc4efc/appel_geocode-1.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6df316f6a29c2067862a55492d27f8e3", "sha256": "0caa3e6e0536b7f6eafacd85da404ce8858653647795e1b7ae544c28d87afefb" }, "downloads": -1, "filename": "appel_geocode-1.1.0.tar.gz", "has_sig": false, "md5_digest": "6df316f6a29c2067862a55492d27f8e3", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 5062118, "upload_time": "2019-09-23T23:12:11", "url": "https://files.pythonhosted.org/packages/64/d7/a0408de4dc25f4fb93b0a9289ddb6b148c5d61444615d56206ac9d482107/appel_geocode-1.1.0.tar.gz" } ] }