{ "info": { "author": "Benjamin Trigona-Harany", "author_email": "bosth@alumni.sfu.ca", "bugtrack_url": null, "classifiers": [ "Topic :: Database", "Topic :: Scientific/Engineering :: GIS" ], "description": "=======\nplpygis\n=======\n\n``plpygis`` is a Python conveter to and from the PostGIS ``geometry`` type, WKB, EWKB, GeoJSON and Shapely geometries and additionally supports ``__geo_interface__``. ``plpygis`` is intended for use in PL/Python functions.\n\nBasic usage\n===========\n\nThe ``Geometry`` class and its subclasses can be used to convert to and from PostGIS geometries. The following example will take a PostGIS multipolygon geometry named ``geom`` and find its largest component polygon.\n\n``Geometry()`` can convert a Postigs ``geometry`` that has been passed as a parameter to a PL/Python function. A ``Geometry`` that is returned from the PL/Python function will automatically be converted back to a PostGIS ``geometry``.\n\n.. code-block:: postgres\n \n CREATE OR REPLACE FUNCTION largest_poly(geom geometry)\n RETURNS geometry \n AS $$\n from plpygis import Geometry\n polygons = Geometry(geom)\n if polygons.type == \"Polygon\":\n return polygons\n elif polygons.type == \"MultiPolygon\":\n largest = max(polygons.shapely, key=lambda polygon: polygon.area)\n return Geometry.from_shapely(largest)\n else:\n return None\n $$ LANGUAGE plpythonu;\n\nDocumentation\n=============\n\nFull ``plpygis`` documentation is available at http://plpygis.readthedocs.io/.\n\n.. image:: https://readthedocs.org/projects/plpygis/badge/?version=latest\n :target: http://plpygis.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/bosth/plpygis", "keywords": "gis geospatial postgis postgresql plpython", "license": "GNU GPLv3", "maintainer": "", "maintainer_email": "", "name": "plpygis", "package_url": "https://pypi.org/project/plpygis/", "platform": "any", "project_url": "https://pypi.org/project/plpygis/", "project_urls": { "Homepage": "https://github.com/bosth/plpygis" }, "release_url": "https://pypi.org/project/plpygis/0.1.0/", "requires_dist": null, "requires_python": "", "summary": "PostGIS Python tools", "version": "0.1.0" }, "last_serial": 3580539, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "889c4c81783741577c6deb54aff193c8", "sha256": "ae4ed356cf6f4e05167b03836160fe12529717a96eaa0c8d0d98dd8b77079ab8" }, "downloads": -1, "filename": "plpygis-0.0.1.tar.gz", "has_sig": false, "md5_digest": "889c4c81783741577c6deb54aff193c8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24586, "upload_time": "2017-07-31T05:25:53", "url": "https://files.pythonhosted.org/packages/ca/7d/5f5261a5aedda657af14af771120f60b620dbd555e9ad3e2fc3428112061/plpygis-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "8e54cdb47985bb66b0441dae728f0fdb", "sha256": "2e9baa29869f51afb84b41892400d8c64a9bd9f4d813e3ee6884781b7ca4a741" }, "downloads": -1, "filename": "plpygis-0.0.2.tar.gz", "has_sig": false, "md5_digest": "8e54cdb47985bb66b0441dae728f0fdb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 39363, "upload_time": "2017-08-07T03:45:47", "url": "https://files.pythonhosted.org/packages/33/34/a351c2fa9330101bf6e48c47768f48e5793dad4e6a4d413fb6d150b553e7/plpygis-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "edbc7b1fe40c2893a14466cf8ca18030", "sha256": "fd40631eaf191a0ea97c9926b168077ba65262fef67fef59facdbaa0e25f8826" }, "downloads": -1, "filename": "plpygis-0.0.3.tar.gz", "has_sig": false, "md5_digest": "edbc7b1fe40c2893a14466cf8ca18030", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30314, "upload_time": "2018-01-21T22:14:29", "url": "https://files.pythonhosted.org/packages/d0/df/84dbfa8ea3219ba91437f1fc784f35952206f23cbd34c6cf214e0de64135/plpygis-0.0.3.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "cfba3d773e4e5638ae197ad4e14cb55c", "sha256": "76a598bc21fcf5eb6a750f5ff1aaa2eefd38adf7c3c23d9c222e3961bbe58df8" }, "downloads": -1, "filename": "plpygis-0.1.0.tar.gz", "has_sig": false, "md5_digest": "cfba3d773e4e5638ae197ad4e14cb55c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30278, "upload_time": "2018-02-14T05:48:13", "url": "https://files.pythonhosted.org/packages/0f/9c/ac526da3569182ef4436c7f57490aa78206f367bbb24ceef83624a712528/plpygis-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "cfba3d773e4e5638ae197ad4e14cb55c", "sha256": "76a598bc21fcf5eb6a750f5ff1aaa2eefd38adf7c3c23d9c222e3961bbe58df8" }, "downloads": -1, "filename": "plpygis-0.1.0.tar.gz", "has_sig": false, "md5_digest": "cfba3d773e4e5638ae197ad4e14cb55c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30278, "upload_time": "2018-02-14T05:48:13", "url": "https://files.pythonhosted.org/packages/0f/9c/ac526da3569182ef4436c7f57490aa78206f367bbb24ceef83624a712528/plpygis-0.1.0.tar.gz" } ] }