{ "info": { "author": "Jonathan Virga", "author_email": "jonathan.virga@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "==============\nIntersectshape\n==============\n\nReverse geocoding from a shapefile of polygons.\n\n\nHow ?\n-----\n\n\nThe ``ReverseGeolocShapefile`` class improves the ``shapefile.Reader`` class by\nadding a ``intersection`` method to find polygons that intersects with a single\npoint.\n\nI use a simple spatial index that store the bounding box of each polygons.\nI save these informations into a ``.sidx.npy`` file next to the ``.dbf``/``.shp``\nfiles.\n\nWorks with Python 3.6+ (I'm using f-string).\n\n\nDocumentation\n-------------\n\nThe ``intersection`` method of the ``ReverseGeolocShapefile`` class return a list\nof row index.\n\n\nUsage\n-----\n\n::\n\n import intersectshape\n\n shp = intersectshape.ReverseGeolocShapefile('/path/of/shapefile.shp')\n\n # You can use all methods of shapefile.Reader object like...\n row = shp.record(5)\n geo = shp.shape(2)\n\n # Find polygons that intersects a point\n x, y = 200, 500 # must be at the same projection system\n ids = shp.intersection(x, y)\n print(ids)\n # return [] or [0, 5, 9, 7] for example.\n\n\nLicense\n-------\n\nThis code are under the `GNU GPL v3 `_ licence.\n\nData of French communal polygons (Geofla shapefile located in the `data`\nfolder) are under `Etalab Open License `_.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jnth/intersectshape", "keywords": null, "license": "GNU GPL v3", "maintainer": null, "maintainer_email": null, "name": "intersectshape", "package_url": "https://pypi.org/project/intersectshape/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/intersectshape/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/jnth/intersectshape" }, "release_url": "https://pypi.org/project/intersectshape/0.1.1/", "requires_dist": null, "requires_python": null, "summary": "Reverse geocoding from a shapefile of polygons.", "version": "0.1.1" }, "last_serial": 2745980, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "91b817e379c6f43326e45c4e57523253", "sha256": "d69677686e4f1e31f26668f36c3762d6a71662830322dbb2e4887133a4900e92" }, "downloads": -1, "filename": "intersectshape-0.1.1.tar.gz", "has_sig": false, "md5_digest": "91b817e379c6f43326e45c4e57523253", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15313, "upload_time": "2017-04-01T13:09:05", "url": "https://files.pythonhosted.org/packages/0e/6d/f7341c0da69547e85d80ef3e6a36edc10402d27ede8900b52bd0aad2330e/intersectshape-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "91b817e379c6f43326e45c4e57523253", "sha256": "d69677686e4f1e31f26668f36c3762d6a71662830322dbb2e4887133a4900e92" }, "downloads": -1, "filename": "intersectshape-0.1.1.tar.gz", "has_sig": false, "md5_digest": "91b817e379c6f43326e45c4e57523253", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15313, "upload_time": "2017-04-01T13:09:05", "url": "https://files.pythonhosted.org/packages/0e/6d/f7341c0da69547e85d80ef3e6a36edc10402d27ede8900b52bd0aad2330e/intersectshape-0.1.1.tar.gz" } ] }