{ "info": { "author": "Lo\u00efc Dutrieux", "author_email": "loic.dutrieux@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "geextract\n=========\n\n*Google Earth Engine data extraction tool. Quickly obtain Landsat multispectral time-series for exploratory analysis and algorithm testing*\n\nOnline documentation available at https://loicdtx.github.io/landsat-extract-gee\n\n.. image:: https://coveralls.io/repos/github/loicdtx/landsat-extract-gee/badge.svg?branch=master\n :target: https://coveralls.io/github/loicdtx/landsat-extract-gee?branch=master\n\n.. image:: https://travis-ci.org/loicdtx/landsat-extract-gee.svg?branch=master\n :target: https://travis-ci.org/loicdtx/landsat-extract-gee\n\n.. image:: https://badge.fury.io/py/geextract.svg\n :target: https://badge.fury.io/py/geextract\n\n\n\nIntroduction\n------------\n\n\nA python library (API + command lines) to extract Landsat time-series from the Google Earth Engine platform. Can query single pixels or spatially aggregated values over polygons. When used via the command line, extracted time-series are written to a sqlite database.\n\nThe idea is to provide quick access to Landsat time-series for exploratory analysis or algorithm testing. Instead of downloading the whole stack of Landsat scenes, preparing the data locally and extracting the time-series of interest, which may take several days, ``geextract`` allows to get time-series in a few seconds.\n\nCompatible with python 2.7 and 3.\n\nUsage\n-----\n\nAPI\n^^^\n\nThe principal function of the API is ``ts_extract``\n\n.. code-block:: python\n\n from geextract import ts_extract\n from datetime import datetime\n\n # Extract a Landsat 7 time-series for a 500m radius circular buffer around\n # a location in Yucatan\n lon = -89.8107197\n lat = 20.4159611\n LE7_dict_list = ts_extract(lon=lon, lat=lat, sensor='LE7',\n start=datetime(1999, 1, 1), radius=500)\n\n\nCommand line\n^^^^^^^^^^^^\n\n``geextract`` comes with two command lines, for extracting Landsat time-series directly from the command line.\n\n- ``gee_extract.py``: Extract a Landsat multispectral time-series for a single site. Extracted data are automatically added to a sqlite database.\n- ``gee_extract_batch.py``: Batch order Landsat multispectral time-series for multiple locations.\n \n.. code-block:: bash\n \n gee_extract.py --help\n\n # Extract all the LT5 bands for a location in Yucatan for the entire Landsat period, with a 500m radius\n gee_extract.py -s LT5 -b 1980-01-01 -lon -89.8107 -lat 20.4159 -r 500 -db /tmp/gee_db.sqlite -site uxmal -table col_1\n gee_extract.py -s LE7 -b 1980-01-01 -lon -89.8107 -lat 20.4159 -r 500 -db /tmp/gee_db.sqlite -site uxmal -table col_1\n gee_extract.py -s LC8 -b 1980-01-01 -lon -89.8107 -lat 20.4159 -r 500 -db /tmp/gee_db.sqlite -site uxmal -table col_1\n\n.. code-block:: bash\n\n gee_extract_batch.py --help\n\n # Extract all the LC8 bands in a 500 meters for two locations between 2012 and now\n echo \"4.7174,44.7814,rompon\\n-149.4260,-17.6509,tahiti\" > site_list.txt\n gee_extract_batch.py site_list.txt -b 1984-01-01 -s LT5 -r 500 -db /tmp/gee_db.sqlite -table landsat_ts\n gee_extract_batch.py site_list.txt -b 1984-01-01 -s LE7 -r 500 -db /tmp/gee_db.sqlite -table landsat_ts\n gee_extract_batch.py site_list.txt -b 1984-01-01 -s LC8 -r 500 -db /tmp/gee_db.sqlite -table landsat_ts\n\n\n.. image:: https://github.com/loicdtx/landsat-extract-gee/raw/master/docs/figs/multispectral_uxmal.png\n\n\n\n\nInstallation\n------------\n\nYou must have a `Google Earth Engine `__ account to use the package.\n\nThen, in a vitual environment run:\n\n.. code-block:: bash\n\n pip install geextract\n earthengine authenticate\n\n\nThis will open a google authentication page in your browser, and will give you an authentication token to paste back in the terminal.\n\nYou can check that the authentication process was successful by running.\n\n.. code-block:: bash\n\n python -c \"import ee; ee.Initialize()\"\n\n\nIf nothing happens... it's working.\n\n\nBenchmark\n---------\n\nA quick benchmark of the extraction speed, using a 500 m buffer.\n\n.. code-block:: python\n\n import time\n from datetime import datetime\n from pprint import pprint\n import geextract\n\n lon = -89.8107197\n lat = 20.4159611\n\n for sensor in ['LT5', 'LE7', 'LT4', 'LC8']:\n start = time.time()\n out = geextract.ts_extract(lon=lon, lat=lat, sensor=sensor, start=datetime(1980, 1, 1, 0, 0),\n end=datetime.today(), radius=500)\n end = time.time()\n\n pprint('%s. Extracted %d records in %.1f seconds' % (sensor, len(out), end - start))\n\n.. code-block:: pycon\n\n # 'LT5. Extracted 142 records in 1.9 seconds'\n # 'LE7. Extracted 249 records in 5.8 seconds'\n # 'LT4. Extracted 7 records in 1.0 seconds'\n # 'LC8. Extracted 72 records in 2.4 seconds'", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/loicdtx/landsat-extract-gee.git", "keywords": "Landsat,surface reflectance,google,gee,time-series", "license": "GPLv3", "maintainer": "", "maintainer_email": "", "name": "geextract", "package_url": "https://pypi.org/project/geextract/", "platform": "", "project_url": "https://pypi.org/project/geextract/", "project_urls": { "Homepage": "https://github.com/loicdtx/landsat-extract-gee.git" }, "release_url": "https://pypi.org/project/geextract/0.5.0/", "requires_dist": null, "requires_python": "", "summary": "Extract Landsat surface reflectance time-series at given location from google earth engine", "version": "0.5.0" }, "last_serial": 4432282, "releases": { "0.3": [ { "comment_text": "", "digests": { "md5": "39c1cf43ce1c0b58c316fd9795a1878e", "sha256": "f662314d4771ad21aa23c4d1c26b1640f4701d168dbd2617433b5ab44696f5a1" }, "downloads": -1, "filename": "geextract-0.3.tar.gz", "has_sig": false, "md5_digest": "39c1cf43ce1c0b58c316fd9795a1878e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9492, "upload_time": "2018-01-03T02:43:50", "url": "https://files.pythonhosted.org/packages/8e/6e/d120be7f91d1213f8ab3f97b6321a324753987ad75b26b224cb4f5431427/geextract-0.3.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "88620a36b4142d610f08135c2c4e59e7", "sha256": "5ceb9a6cd5073abc4b566bcfe5de6748a7e0f635d235a77538d678151c143bee" }, "downloads": -1, "filename": "geextract-0.3.1.tar.gz", "has_sig": false, "md5_digest": "88620a36b4142d610f08135c2c4e59e7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9781, "upload_time": "2018-01-03T03:35:31", "url": "https://files.pythonhosted.org/packages/da/87/1318d435304c03726d5ab53a94fdaaacf7a477a2c109dbdb1a86df230f80/geextract-0.3.1.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "f111ff06c29c5838cce22d8fbb577552", "sha256": "e42cca5c90cd28cd1ce93d8314318d7425bc14a00212efbf13a8dd0f2655ee47" }, "downloads": -1, "filename": "geextract-0.3.2.tar.gz", "has_sig": false, "md5_digest": "f111ff06c29c5838cce22d8fbb577552", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9919, "upload_time": "2018-01-03T18:51:21", "url": "https://files.pythonhosted.org/packages/97/10/ce53f6a1b5164fe11b150ecc0d80fa159c39345909e42cce11549c7c1f46/geextract-0.3.2.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "7fac493cb4e208f9f991039a75774ed3", "sha256": "59b027fa5423a8abe06e397a13896075ae38830475a87be162f936fa80795473" }, "downloads": -1, "filename": "geextract-0.4.0.tar.gz", "has_sig": false, "md5_digest": "7fac493cb4e208f9f991039a75774ed3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9661, "upload_time": "2018-08-14T23:02:45", "url": "https://files.pythonhosted.org/packages/f9/31/06c8856b3d4d238bac10190047f634a69999cb56ef02effd35d4eafd5e87/geextract-0.4.0.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "ae904e069b0ae57681d6aeaef358ca68", "sha256": "75cc441e178587e13133a7217ea4a15e4f87a20db432a92bc26e69ec2abaf5b3" }, "downloads": -1, "filename": "geextract-0.5.0.tar.gz", "has_sig": false, "md5_digest": "ae904e069b0ae57681d6aeaef358ca68", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9974, "upload_time": "2018-10-30T16:30:09", "url": "https://files.pythonhosted.org/packages/8c/0a/06bb883cbbe8d11ba818d8a23a35a38eaed3883a672315dbb8bad18d8ba8/geextract-0.5.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ae904e069b0ae57681d6aeaef358ca68", "sha256": "75cc441e178587e13133a7217ea4a15e4f87a20db432a92bc26e69ec2abaf5b3" }, "downloads": -1, "filename": "geextract-0.5.0.tar.gz", "has_sig": false, "md5_digest": "ae904e069b0ae57681d6aeaef358ca68", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9974, "upload_time": "2018-10-30T16:30:09", "url": "https://files.pythonhosted.org/packages/8c/0a/06bb883cbbe8d11ba818d8a23a35a38eaed3883a672315dbb8bad18d8ba8/geextract-0.5.0.tar.gz" } ] }