{ "info": { "author": "Amit Kapadia", "author_email": "amit@planet.com", "bugtrack_url": null, "classifiers": [], "description": "maxrect\n=======\n\nFind the maximally inscribed, axis-aligned rectangle for a given polygon.\nFind the intersection of multiple polygons.\n\n.. image:: https://pl-amit.s3.amazonaws.com/demo/maxrect/maximal-rectangle.png\n\n\nInstallation\n------------\n\n.. code-block:: bash\n\n pip install git+https://${GITHUB_TOKEN}@github.com/planetlabs/maxrect.git\n\n\nCLI\n---\n\n.. code-block:: bash\n\n\n # For a given GeoJSON file\n $ max-rect [path/to/file]\n\n # Piping\n $ cat path/to/file.geojson | max-rect\n\n # For a quick visualization\n $ cat path/to/file.geojson | max-rect | geojsonio\n\n # For comparison between the original polygon and the inscribed rectangle\n $ cat path/to/file.geojson | max-rect --compare | geojsonio\n\n # Find the intersection of two geojson files\n poly-intersect path/to/file1.geojson path/to/file2.geojson | geojsonio\n\n # Find the largest inscribed rectangle that sits within multiple shapes\n poly-intersect path/to/file1.geojson path/to/file2.geojson | max-rect | geojsonio\n\n # Find the intersection of two geojson files\n poly-intersect path/to/file1.geojson path/to/file2.geojson | geojsonio\n\n # Find the largest inscribed rectangle that sits within multiple shapes\n poly-intersect path/to/file1.geojson path/to/file2.geojson | max-rect | geojsonio\n\n\nPython\n------\n\n.. code-block:: python\n\n from maxrect import get_intersection, get_maximal_rectangle, rect2poly\n\n # For a given convex polygon\n coordinates1 = [ [x0, y0], [x1, y1], ... [xn, yn] ]\n coordinates2 = [ [x0, y0], [x1, y1], ... [xn, yn] ]\n\n # find the intersection of the polygons\n _, coordinates = get_intersection([coordinates1, coordinates2])\n\n # get the maximally inscribed rectangle\n ll, ur = get_maximal_rectangle(coordinates)\n\n # casting the rectangle to a GeoJSON-friendly closed polygon\n rect2poly(ll, ur)", "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/kapadia/maxrect", "keywords": "", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "maxrect", "package_url": "https://pypi.org/project/maxrect/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/maxrect/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/kapadia/maxrect" }, "release_url": "https://pypi.org/project/maxrect/0.0.1dev/", "requires_dist": null, "requires_python": null, "summary": "Find the maximal area rectangle from a polygon.", "version": "0.0.1dev" }, "last_serial": 1657329, "releases": { "0.0.1dev": [ { "comment_text": "", "digests": { "md5": "d69b123e30ddfcd27a5ea6fbdb7faaca", "sha256": "3b3e989ac15ab58de30751310d0c00a327210344d8a37ab1c38b0e5836f5d5f8" }, "downloads": -1, "filename": "maxrect-0.0.1dev.tar.gz", "has_sig": false, "md5_digest": "d69b123e30ddfcd27a5ea6fbdb7faaca", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3993, "upload_time": "2015-07-30T19:55:03", "url": "https://files.pythonhosted.org/packages/90/64/71dbc5029ee061065a7c47aa2ac3a0c6621ef49f0eda736fc524dbf01311/maxrect-0.0.1dev.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d69b123e30ddfcd27a5ea6fbdb7faaca", "sha256": "3b3e989ac15ab58de30751310d0c00a327210344d8a37ab1c38b0e5836f5d5f8" }, "downloads": -1, "filename": "maxrect-0.0.1dev.tar.gz", "has_sig": false, "md5_digest": "d69b123e30ddfcd27a5ea6fbdb7faaca", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3993, "upload_time": "2015-07-30T19:55:03", "url": "https://files.pythonhosted.org/packages/90/64/71dbc5029ee061065a7c47aa2ac3a0c6621ef49f0eda736fc524dbf01311/maxrect-0.0.1dev.tar.gz" } ] }