{ "info": { "author": "Carlo de Franchis", "author_email": "carlo.de-franchis@ens-cachan.fr", "bugtrack_url": null, "classifiers": [], "description": "# Time Series Downloader (TSD)\n[![Build Status](https://travis-ci.com/cmla/tsd.svg?branch=master)](https://travis-ci.com/cmla/tsd)\n\nAutomatic download of Sentinel, Landsat and Planet crops.\n\n[Carlo de Franchis](mailto:carlo.de-franchis@ens-cachan.fr),\nCMLA, ENS Cachan, Universit\u00e9 Paris-Saclay, 2016-19\n\nWith contributions from [Enric Meinhardt-Llopis](mailto:enric.meinhardt@cmla.ens-cachan.fr), [Axel Davy](mailto:axel.davy@ens.fr) and [Tristan Dagobert](mailto:tristan.dagobert@cmla.ens-cachan.fr).\n\n\nThe main source code repository for this software is https://github.com/cmla/tsd.\n\n# Installation and dependencies\n\n## GDAL\nThe main dependency is GDAL. All the others can be installed\nwith `pip` as shown in the [next section](#install-tsd-as-a-python-package).\n\n### On Ubuntu\n`gdal` can be installed with `apt-get`. In order to get a\nrecent version we recommend adding the PPA `ubuntugis-unstable` (first\ncommand below):\n\n sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable\n sudo apt-get update\n sudo apt-get install libgdal-dev gdal-bin\n\n### On macOS\nThere are several ways of installing `gdal`. I recommend option 1 as it\ngives a version of gdal 2.3 that works with JP2 files.\n\n_Note_: a shell script installing all the needed stuff (`brew`, `python`,\n`gdal`...) on an empty macOS system is given in the file\n[macos_install_from_scratch.sh](macos_install_from_scratch.sh).\n\n#### Option 1: using the GDAL Complete Compatibility Framework.\n\n[Download](http://www.kyngchaos.com/files/software/frameworks/GDAL_Complete-2.3.dmg)\nand install the `.dmg` file. Update your `PATH` after the installation by\nrunning this command:\n\n export PATH=\"/Library/Frameworks/GDAL.framework/Programs:$PATH\"\n\nCopy it in your `~/.profile`.\n\n#### Option 2: using brew\n\n brew install gdal --with-complete\n\nNote that this version doesn't support JP2 files (hence it will fail to get\nSentinel-2 crops).\n\n## Install TSD as a python package\n\nOnce `gdal` is installed on your machine you can install `tsd` with `pip`:\n\n git clone https://github.com/cmla/tsd\n cd tsd\n pip install numpy # required by rasterio\n pip install -e . --no-binary rasterio\n\nAlternatively `tsd` can also be installed without downloading a tarball or a git clone:\n\n pip install --upgrade https://github.com/cmla/tsd/tarball/master --no-binary rasterio\n\n\n# Usage\n\nSearch and download is performed by `get_sentinel2.py`, `get_landsat.py`,\n`get_planet.py` and `get_sentinel1.py` (one file per satellite constellation).\nThey can be used both as command line scripts or as Python modules.\n\nThey use the Python modules `search_devseed.py`, `search_scihub.py`,\n`search_peps.py` and `search_planet.py` (one file per API provider).\n\n## From the command line\nTSD can be used from the command line through the Python scripts\n`get_*.py`. For instance, to download and process Sentinel-2 images of the\nJamnagar refinery, located at latitude 22.34806 and longitude 69.86889, run\n\n python get_sentinel2.py --lat 22.34806 --lon 69.86889 -b B02 B03 B04 -o test\n\nThis downloads crops of size 5000 x 5000 meters from the bands 2, 3 and 4,\ncorresponding to the blue, green and red channels, and stores them in geotif\nfiles in the `test` directory.\n\nIt should print something like this on `stdout` (the number of images might vary):\n\n Found 22 images\n Elapsed time: 0:00:02.301129\n\n Downloading 66 crops (22 images with 3 bands)... 66 / 66\n Elapsed time: 0:00:57.620805\n\n Reading 22 cloud masks... 22 / 22\n 6 cloudy images out of 22\n Elapsed time: 0:00:15.066992\n\nImages with more than half of the pixels covered by clouds (according to the\ncloud polygons available in Sentinel-2 images metadata, or Landsat-8 images\nquality bands) are moved in the `test/cloudy` subfolder.\n\nTo specify the desired bands, use the `-b` or `--band` flag. The crop size can\nbe changed with the `--width` and `--height` flags. For instance\n\n python get_sentinel2.py --lat 22.34806 --lon 69.86889 -b B11 B12 --width 8000 --height 6000\n\ndownloads crops of size 8000 x 6000 meters, only for the SWIR channels (bands 11\nand 12).\n\nAll the available options are listed with the `-h` or `--help` flag:\n\n python get_sentinel2.py -h\n\nYou can also run any of the `search_*.py` scripts from the command line\nseparately. Run them with `-h` to get the list of available options. For a\nnice output formatting, pipe their output to `jq` (`brew install jq`).\n\n python search_devseed.py --lat 22.34806 --lon 69.86889 | jq\n\n\n## As Python modules\n\nThe Python modules can be imported to call their functions from Python. Refer\nto their docstrings to get usage information. Here are some examples.\n\n # define an area of interest\n import tsd\n lat, lon = 42, 3\n aoi = tsd.utils.geojson_geometry_object(lat, lon, 5000, 5000)\n\n # search Landsat-8 images available on the AOI with Development Seed's API\n x = tsd.search_devseed.search(aoi, satellite='Landsat-8')", "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/cmla/tsd", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "tsd", "package_url": "https://pypi.org/project/tsd/", "platform": "", "project_url": "https://pypi.org/project/tsd/", "project_urls": { "Homepage": "https://github.com/cmla/tsd" }, "release_url": "https://pypi.org/project/tsd/0.6.0/", "requires_dist": null, "requires_python": ">=3.5", "summary": "Search and download of Sentinel, Landsat and Planet crops.", "version": "0.6.0" }, "last_serial": 5589135, "releases": { "0.3.0": [ { "comment_text": "", "digests": { "md5": "6b1faa330df0569bed379be5363146cc", "sha256": "fe10c13c25216f1c2ce59e2586efb4d9ba4c9f20db0dcc9767a3c704a2f804df" }, "downloads": -1, "filename": "tsd-0.3.0.tar.gz", "has_sig": false, "md5_digest": "6b1faa330df0569bed379be5363146cc", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 40979, "upload_time": "2019-04-22T16:02:54", "url": "https://files.pythonhosted.org/packages/5a/9c/a08fee0cffa09c8ee750af23be61a816ce52fa378f9ca2adbaefd0a49221/tsd-0.3.0.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "f37766116d453b67c5682642a4f871c1", "sha256": "245d1c0c18beb39198d5012b2776ee44fbad0ba3806027f1260317fe3441f45d" }, "downloads": -1, "filename": "tsd-0.4.0.tar.gz", "has_sig": false, "md5_digest": "f37766116d453b67c5682642a4f871c1", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 40962, "upload_time": "2019-04-22T16:06:12", "url": "https://files.pythonhosted.org/packages/d9/4a/a5d4c4c70986a0bb466f6c45a9446bf3a62bd7d92980d3e40b3985f8d695/tsd-0.4.0.tar.gz" } ], "0.4.11": [ { "comment_text": "", "digests": { "md5": "42e8f56e0052e90b1a3fffd617569e84", "sha256": "cf6ec15ab5bf7640a3610838698d2efea2a49b91d26cf24fe47c0bd59d434559" }, "downloads": -1, "filename": "tsd-0.4.11.tar.gz", "has_sig": false, "md5_digest": "42e8f56e0052e90b1a3fffd617569e84", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 41548, "upload_time": "2019-04-22T20:58:39", "url": "https://files.pythonhosted.org/packages/cf/ef/7672841fc38f2518e2cbeb1ace9073ea3ef8ff1e517e948d8b7e53b8bdfb/tsd-0.4.11.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "7a48842d7854425e537f93920da31728", "sha256": "cbc7da8a587d8985532aa393822f38b1f859f1d278c6ee06033fee2f3c767794" }, "downloads": -1, "filename": "tsd-0.5.0.tar.gz", "has_sig": false, "md5_digest": "7a48842d7854425e537f93920da31728", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 41764, "upload_time": "2019-04-25T14:58:05", "url": "https://files.pythonhosted.org/packages/37/92/849daf8218f9029023108a1f5eddc2b0da63d5dd74a969c7f26118783777/tsd-0.5.0.tar.gz" } ], "0.6.0": [ { "comment_text": "", "digests": { "md5": "fdda4551e9e2ed284f697fa4074ad8de", "sha256": "f469e93a3a5a869337fe7fa4ab02a5ceb415231eda006e724cbedac4ecf03ee7" }, "downloads": -1, "filename": "tsd-0.6.0.tar.gz", "has_sig": false, "md5_digest": "fdda4551e9e2ed284f697fa4074ad8de", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 42865, "upload_time": "2019-07-26T13:46:01", "url": "https://files.pythonhosted.org/packages/81/d2/c814e1b7aa2cab4f20f376f7cdc2ea6312cea31c4c80578608cce9f88457/tsd-0.6.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "fdda4551e9e2ed284f697fa4074ad8de", "sha256": "f469e93a3a5a869337fe7fa4ab02a5ceb415231eda006e724cbedac4ecf03ee7" }, "downloads": -1, "filename": "tsd-0.6.0.tar.gz", "has_sig": false, "md5_digest": "fdda4551e9e2ed284f697fa4074ad8de", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 42865, "upload_time": "2019-07-26T13:46:01", "url": "https://files.pythonhosted.org/packages/81/d2/c814e1b7aa2cab4f20f376f7cdc2ea6312cea31c4c80578608cce9f88457/tsd-0.6.0.tar.gz" } ] }