{ "info": { "author": "Samapriya Roy", "author_email": "samapriya.roy@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.6", "Topic :: Scientific/Engineering :: GIS" ], "description": "# Planet-Mosaic-Quads-Download-CLI\r\n[![PyPI version](https://badge.fury.io/py/pbasemap.svg)](https://badge.fury.io/py/pbasemap)\r\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.2643056.svg)](https://doi.org/10.5281/zenodo.2643056)\r\n\r\nPlanet creates global monthly mosaics apart from creating mosaics at different frequencies, monthly mosaics are of interest to a lot of people who would like to do a consistent time series analysis using these mosaics and would like to apply them to an existing analytical pipeline. I created this tool to allow you pass single or multiple geometries in a folder for the tool to find the mosaic quads and then process and download it. For now the geometry is passed as a geojson file, but I have included a tool for you to convert any shapefile into geojson files so you can use this tool. In the future I will add support for kml and json files as well.\r\n\r\nYou can cite the tool using the following or from [this link](https://zenodo.org/record/2641691)\r\n\r\n```\r\nSamapriya Roy. (2019, April 17). samapriya/Planet-Mosaic-Quads-Download-CLI: Planet Mosaic Quads Download CLI (Version 0.0.7). Zenodo.\r\nhttp://doi.org/10.5281/zenodo.2643056\r\n```\r\n\r\n\r\n\r\n## Table of contents\r\n* [Installation](#installation)\r\n* [Getting started](#getting-started)\r\n* [pbasemap Planet Mosaic Quads Download CLI](#pbasemap-planet-mosaic-quads-download-cli)\r\n * [bounding box](#bounding-box)\r\n * [mosaic list](#mosaic-list)\r\n * [download mosaic](#download-mosaic)\r\n * [multipart download mosaic](#multipart-download-mosaic)\r\n * [shape to geojson](#shape-to-geojson)\r\n\r\n## Installation\r\n** Install Fiona and GDAL for windows using the whl files [here](https://www.lfd.uci.edu/~gohlke/pythonlibs/)** if there are any issues during installation.\r\n\r\nThis assumes that you have native python & pip installed in your system, you can test this by going to the terminal (or windows command prompt) and trying\r\n\r\n```python``` and then ```pip list```\r\n\r\nIf you get no errors and you have python 2.7.14 or higher you should be good to go. Please note that I have tested this only on python 2.7.15 but it should run on python 3.\r\n\r\nTo install **pbasemap: Planet Mosaic Quads Download CLI** you can install using two methods\r\n\r\n```pip install pbasemap```\r\n\r\nor you can also try\r\n\r\n```\r\ngit clone https://github.com/samapriya/Planet-Mosaic-Quads-Download-CLI.git\r\ncd pbasemap\r\npython setup.py install\r\n```\r\nFor **linux use sudo and for windows right click the command prompt and run as admin**.\r\n\r\nInstallation is an optional step; the application can be also run directly by executing pbasemap.py script. The advantage of having it installed is being able to execute ppipe as any command line tool. I recommend installation within virtual environment. If you don't want to install, browse into the pbasemap folder and try ```python pbasemap.py``` to get to the same result.\r\n\r\n\r\n## Getting started\r\n\r\nAs usual, to print help:\r\n\r\n```\r\nusage: pbasemap.py [-h] {rbox,mosaic_list,download,mpdownload,shp2geojson} ...\r\n\r\nPlanet Mosaic Quads Download CLI\r\n\r\npositional arguments:\r\n {rbox,mosaic_list,download,mpdownload,shp2geojson}\r\n rbox Prints bounding box for geometry\r\n mosaic_list Tool to get Mosaic & Bounding Box list\r\n download Download quad GeoTiffs choose from name or idlist\r\n mpdownload Download quad GeoTiffs using multipart downloader\r\n shp2geojson Convert all shapefiles in folder to GeoJSON\r\n\r\noptional arguments:\r\n -h, --help show this help message and exit\r\n ```\r\n\r\nTo obtain help for a specific functionality, simply call it with _help_ switch, e.g.: `pbasemap shp2geojson -h`. If you didn't install pbasemap, then you can run it just by going to *pbasemap* directory and running `python pbasemap.py [arguments go here]`\r\n\r\n## pbasemap Simple CLI for Basemaps API\r\nThe tool allows you to list and download basemap quads that instersect with area of interest, and have controls such as date range and check for final coverage before download. The CLI also allows you to export the mosaics list as needed and can handle GeoJSON and KML files, and includes a tool to convert shapefiles to GeoJSON files for use with this tool.\r\n\r\n### bounding box\r\nThis tool simply prints the bounding box for any geometry feature that is passed. This is useful if you are using the planet CLI to downlaod quads which requires a bounding box.It prints out the bounding box for use.\r\n\r\n```\r\nusage: pbasemap.py rbox [-h] [--geometry GEOMETRY]\r\n\r\noptional arguments:\r\n -h, --help show this help message and exit\r\n --geometry GEOMETRY Choose a geometry file supports GeoJSON, KML\r\n\r\n```\r\n\r\n### mosaic list\r\nThis tool exports the mosaics name, id that intersect with your bounding box for your geometry. This can then be used to download the quads.\r\n\r\n```\r\nusage: pbasemap.py mosaic_list [-h] [--geometry GEOMETRY] [--start START]\r\n [--end END] [--output OUTPUT]\r\n\r\noptional arguments:\r\n -h, --help show this help message and exit\r\n --geometry GEOMETRY Choose a geometry file supports GeoJSON, KML\r\n --start START Choose Start date in format YYYY-MM-DD\r\n --end END Choose End date in format YYYY-MM-DD\r\n --output OUTPUT Full path where you want your mosaic list exported\r\n```\r\n\r\n### download mosaic\r\nAs the name suggests this downloads your mosaic to the local folder you specify, you can specify how much coverage you want over your geometry and over the quad. So you may decide to only download those mosaic quads that have coverage more than 90% by simply specifying ```--coverage 90``` in the arguments. Once you create the list of mosaics that intersect with your geometry, you should be able to use the idlist option to export them all. Since L15 qauds can have the same name, the name of the mosaic is prepended to the filename.\r\n\r\n```\r\nusage: pbasemap.py download [-h] [--geometry GEOMETRY] [--local LOCAL]\r\n [--coverage COVERAGE] [--name NAME]\r\n [--idlist IDLIST]\r\n\r\noptional arguments:\r\n -h, --help show this help message and exit\r\n --geometry GEOMETRY Choose a geometry file supports GeoJSON, KML\r\n --local LOCAL Local folder to download images\r\n\r\nOptional named arguments:\r\n --coverage COVERAGE Choose minimum percentage coverage\r\n --name NAME Mosaic name from earlier search or csvfile\r\n --idlist IDLIST Mosaic list csvfile\r\n```\r\n\r\n### multipart download mosaic\r\nThis uses a multipart downloader to download your mosaic to the local folder you specify, you can specify how much coverage you want over your geometry and over the quad. So you may decide to only download those mosaic quads that have coverage more than 90% by simply specifying ```--coverage 90``` in the arguments.Once you create the list of mosaics that intersect with your geometry, you should be able to use the idlist option to export them all. Since L15 qauds can have the same name, the name of the mosaic is prepended to the filename.\r\n\r\n```\r\nusage: pbasemap.py mpdownload [-h] [--geometry GEOMETRY] [--local LOCAL]\r\n [--coverage COVERAGE] [--name NAME]\r\n [--idlist IDLIST]\r\n\r\noptional arguments:\r\n -h, --help show this help message and exit\r\n --geometry GEOMETRY Choose a geometry file supports GeoJSON, KML\r\n --local LOCAL Local folder to download images\r\n\r\nOptional named arguments:\r\n --coverage COVERAGE Choose minimum percentage coverage\r\n --name NAME Mosaic name from earlier search or csvfile\r\n --idlist IDLIST Mosaic list csvfile\r\n```\r\n\r\n### shape to geojson\r\nThis tool allows you to convert from a folder with multiple shapefiles to a folder with geojson that can then be used with the tool. It makes use of geopandas and reprojects your shapefile to make it compatible while passing onto the API for search and download.\r\n\r\n```\r\nusage: pbasemap shp2geojson [-h] [--source SOURCE] [--destination DESTINATION]\r\n\r\noptional arguments:\r\n -h, --help show this help message and exit\r\n --source SOURCE Choose Source Folder\r\n --destination DESTINATION\r\n Choose Destination Folder\r\n```\r\n\r\n## Changelog\r\n\r\n### v0.1.0\r\n\r\n- Improvements to installation\r\n- Now creates folders to download mosaic quads\r\n- Fixed issue with multipart downloader\r\n\r\n### v0.0.8\r\n\r\n- Minor improvements\r\n- Checks for download permission\r\n\r\n### v0.0.7\r\n\r\n- Updated feedback, major changes to the codebase and underlying methodology\r\n- Optimized code for search and download\r\n- Overall improvements to code and major revisions\r\n\r\n### v0.0.5\r\n\r\n- Complete change to the codebase and underlying methodology\r\n- Optimized code for search and download\r\n- Overall improvements to code and major revisions\r\n\r\n### v0.0.4\r\n\r\n- Fixed projection issue for shapefiles\r\n- Optimized code for shapefile to geojson export\r\n- Overall improvements to code and minor revisions\r\n\r\n\r\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/samapriya/Planet-Mosaic-Quads-Download-CLI", "keywords": "", "license": "Apache 2.0", "maintainer": "", "maintainer_email": "", "name": "pbasemap", "package_url": "https://pypi.org/project/pbasemap/", "platform": "", "project_url": "https://pypi.org/project/pbasemap/", "project_urls": { "Homepage": "https://github.com/samapriya/Planet-Mosaic-Quads-Download-CLI" }, "release_url": "https://pypi.org/project/pbasemap/0.1.0/", "requires_dist": [ "requests (>=2.19.1)", "DateTimeRange (>=0.5.5)", "planet (>=1.2.1)", "psutil (>=5.4.5)", "retrying (>=1.3.3)", "shapely; platform_system != \"Windows\"", "geopandas (>=0.4.0); platform_system != \"Windows\"", "fiona (>=1.8.6); platform_system != \"Windows\"", "pypiwin32; platform_system == \"Windows\"", "pywin32; platform_system == \"Windows\"", "pySmartDL (==1.2.5); python_version < \"3.4\"", "pySmartDL (>=1.3.1); python_version > \"3.4\"" ], "requires_python": "", "summary": "Tool to download Planet Monthly Mosaic Quads", "version": "0.1.0" }, "last_serial": 5443786, "releases": { "0.0.4": [ { "comment_text": "", "digests": { "md5": "9d026b7ff776f945b1d29f93e67347ef", "sha256": "c6cdb80f0f37bca23ee7c12451a3ffa20e582aa7fe20974be9d03553eafb94c9" }, "downloads": -1, "filename": "pbasemap-0.0.4.tar.gz", "has_sig": false, "md5_digest": "9d026b7ff776f945b1d29f93e67347ef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7427, "upload_time": "2018-09-14T14:24:13", "url": "https://files.pythonhosted.org/packages/12/b5/79c98e50ad1e7b02832fadf50ee8dd2890b1660b9b6567a201dcd3ef7277/pbasemap-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "a6feed7d517a39370b55b4259578cd59", "sha256": "36583c5ea191887242f0c00baf864a0d25b0baca7e82a10892fec64d1b277745" }, "downloads": -1, "filename": "pbasemap-0.0.5.tar.gz", "has_sig": false, "md5_digest": "a6feed7d517a39370b55b4259578cd59", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8658, "upload_time": "2019-04-16T07:45:22", "url": "https://files.pythonhosted.org/packages/72/b4/385ca91cee238c3556625ed24ddf0a8dcb0a881c5573761f4db5227f3469/pbasemap-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "acbf3a8c4865911b9065d8d88cbab941", "sha256": "2c249d7d6fd09b965737bf753e8b9a47af4afa4ec5d837af0d0b344e63d882bf" }, "downloads": -1, "filename": "pbasemap-0.0.6.tar.gz", "has_sig": false, "md5_digest": "acbf3a8c4865911b9065d8d88cbab941", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8866, "upload_time": "2019-04-16T20:20:09", "url": "https://files.pythonhosted.org/packages/b7/68/1ae1ad4e69f70822faab4b849e177109f0380fd4daaa34a735a100735782/pbasemap-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "47542f3c2efbd5b2a5ae9fe4093351ba", "sha256": "7897a2a299218c61230e671d008e8b27536f6dbef369251af8b12c666c0afbcb" }, "downloads": -1, "filename": "pbasemap-0.0.7.tar.gz", "has_sig": false, "md5_digest": "47542f3c2efbd5b2a5ae9fe4093351ba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9323, "upload_time": "2019-04-17T06:01:46", "url": "https://files.pythonhosted.org/packages/0e/ae/a1351e2b905744b8f37dfa1872c2ae1b871e75317d6348c790b8fec4dee6/pbasemap-0.0.7.tar.gz" } ], "0.0.8": [ { "comment_text": "", "digests": { "md5": "8960b3365c9876acbc49c08aca364cb3", "sha256": "4c2c3ebfd17da7734e8164710378429e22d99fe8dacdb088e750b5e5580c7ede" }, "downloads": -1, "filename": "pbasemap-0.0.8-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "8960b3365c9876acbc49c08aca364cb3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 14153, "upload_time": "2019-06-05T13:47:38", "url": "https://files.pythonhosted.org/packages/07/21/2968a36501de62b3a7263cf9277d8a95cb90887a97f82d9207d839745381/pbasemap-0.0.8-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "46423d864fa78b1e8995e7cda6f73649", "sha256": "8f5e9d9aeb52a88164ae81de63c3bb8f8c13758c0569112808ca2caf6d2bfebe" }, "downloads": -1, "filename": "pbasemap-0.0.8.tar.gz", "has_sig": false, "md5_digest": "46423d864fa78b1e8995e7cda6f73649", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9420, "upload_time": "2019-06-05T13:47:39", "url": "https://files.pythonhosted.org/packages/16/18/b4cde5527d06a26060ca78ef2d4eaca8c1e6f5fa0f946faae499f570157e/pbasemap-0.0.8.tar.gz" } ], "0.0.9": [ { "comment_text": "", "digests": { "md5": "a94f111f648151e68acdf76612a72ca6", "sha256": "09b40a78c59f9bfde2a79bf9f53f96a1ae06e99cfd3c090a576cff6714b498a5" }, "downloads": -1, "filename": "pbasemap-0.0.9-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a94f111f648151e68acdf76612a72ca6", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 14136, "upload_time": "2019-06-06T18:02:59", "url": "https://files.pythonhosted.org/packages/ac/e3/7e961ddc4439fa94e87b8a4f11fe527592b1b9bdf1a0d3dddf1a739da1a2/pbasemap-0.0.9-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "476f2039b6e405a66990067c7a2e193a", "sha256": "1ab9bf75b05e4233ebffa035a98127df76df51547cca4682499359d867a5dfe7" }, "downloads": -1, "filename": "pbasemap-0.0.9.tar.gz", "has_sig": false, "md5_digest": "476f2039b6e405a66990067c7a2e193a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9400, "upload_time": "2019-06-06T18:03:00", "url": "https://files.pythonhosted.org/packages/b1/e3/74c18a900f31ccef0316390240c64646d4b82c7d760ba2d73e7efbb8b661/pbasemap-0.0.9.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "d87727c8ab628f7ab1011a868aefad7e", "sha256": "2843fa2e75c046a7ffccb6f2bdcac5d0961c0c76b232cd8892b54fb901cf18f2" }, "downloads": -1, "filename": "pbasemap-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d87727c8ab628f7ab1011a868aefad7e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 14371, "upload_time": "2019-06-25T04:44:35", "url": "https://files.pythonhosted.org/packages/6c/43/953d5f572f2922f7f8e20ad7ae7674cc6b60943d042ec0271ff9b69aa5bb/pbasemap-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "add32165024bc5f965275aff52e181b6", "sha256": "469dc540444211399041a3e03f1a71f7ee32f7d012d0257b1aada50f8c5740af" }, "downloads": -1, "filename": "pbasemap-0.1.0.tar.gz", "has_sig": false, "md5_digest": "add32165024bc5f965275aff52e181b6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9580, "upload_time": "2019-06-25T04:44:37", "url": "https://files.pythonhosted.org/packages/96/ee/615eb463cfd3ce4e929e5d9e4ae39b6f1467a1525264879e94baa44250d0/pbasemap-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d87727c8ab628f7ab1011a868aefad7e", "sha256": "2843fa2e75c046a7ffccb6f2bdcac5d0961c0c76b232cd8892b54fb901cf18f2" }, "downloads": -1, "filename": "pbasemap-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d87727c8ab628f7ab1011a868aefad7e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 14371, "upload_time": "2019-06-25T04:44:35", "url": "https://files.pythonhosted.org/packages/6c/43/953d5f572f2922f7f8e20ad7ae7674cc6b60943d042ec0271ff9b69aa5bb/pbasemap-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "add32165024bc5f965275aff52e181b6", "sha256": "469dc540444211399041a3e03f1a71f7ee32f7d012d0257b1aada50f8c5740af" }, "downloads": -1, "filename": "pbasemap-0.1.0.tar.gz", "has_sig": false, "md5_digest": "add32165024bc5f965275aff52e181b6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9580, "upload_time": "2019-06-25T04:44:37", "url": "https://files.pythonhosted.org/packages/96/ee/615eb463cfd3ce4e929e5d9e4ae39b6f1467a1525264879e94baa44250d0/pbasemap-0.1.0.tar.gz" } ] }