{ "info": { "author": "Tavis Barr", "author_email": "tavisbarr@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "TILESCRAPER\n-----------\n\nBy Tavis Barr, tavisbarr@gmail.com, Copyright 2016\nLicensed under the Lesser Gnu Public License V. 2.0\nContact me about other licensing arrangements\n\n\nThis program pulls images from the NASA MODIS satellite. See the satellite\nhome page at http://modis.gsfc.nasa.gov/ for more information about its\nfeatures and capabilities.\n\nThe purpose of the program is to simplify the process of downloading images.\nThe interface provided by the web site allows for pulling images that match\na pre-existing set of tiles whose boundaries are a bit opaque (but can be\nfigured out with a bit of detective work). This program saves you the \ntrouble of doing the detective work and allows you to pull the data given\njust the latitude/longitude of the image sides. Images are pulled at the\nhighest possible resolution and then resized according to the command\nargument.\n\nThe next section describes the methods used; you can skip to the following\nsection if you just want to use the program.\n\n\nMETHODOLOGY\n-----------\n\nThe MODIS data are made available in tiles. There are several APIs available\nto pull these tiles; this package uses the REST API. See the MODIS web site\nfor details on other APIs.\n\nThe MODIS data are given in layers, such as corrected reflectance, aerosol\ndepth, etc. A complete list of available layers is available by using the\ngetLayers() command. Different layers are available at different resolutions.\n\nThe layers can be accessed using different tile matrices. Each tile matrix\nrepresents a different image resolution. The first two tile matrices divide\nthe world into two tiles (East/West) and eight tiles (two North/South by four\nEast/West), respectively.\n\nTile matrix #3 is the lowest one that corresponds to specified resolution. \nThe underlying assumption is that the image of the world (laid out like an \norange peel onto a flat surface) can be represented by a 40940x20480 kilometer\nrectangle, with the equator and the Greenwich meridian as its centers. \nTile matrix #3 is a matrix 10 tiles wide by 5 tiles high. This corresponds to\nan 8km resolution for each pixel, with each 512x512 tile representing a \n(512*8)x(512*8) = 4096x4096 kilometer region.\n\nAs the tile matrix number goes up, the number of tiles doubles and the\nresolution is cut in half. Thus, tile matrix #4 represents a 4km resolution,\ntile matrix #5 represents a 2km resolution, etc.\n\nOf course, since the Earth is not flat, these resolutions are not exact. I\nassume they are correct at the Equator?\n\nGiven this information, it is easy to calculate the appropriate tiles for a\ngiven latitude and longitude of the border. The program then pastes the \nrelevant tiles together, and crops any parts of tiles that are outside of\nthe requested area. \n\n\nMETHODS\n-------\n\nThe following routines are available for this program:\n\ngetLayers()\t\tqueries the MODIS web site to find out which layers are\n\t\t\t\tavailable for download. The names of the layers are\n\t\t\t\trelatively intuitive, but one can visit the web site for\n\t\t\t\tfurther information.\n\t\t\t\t\n\t\t\t\tThe program uses a global variable, so the web site is\n\t\t\t\tonly queried on the first call per execution.\n\ngetResolutions() returns a dictionary of the maximum available resolution\n\t\t\t\tfor each available layer.\n\t\t\t\t\ngetFormat()\t\treturns the image format that each layer is available in.\n\t\t\t\tDifferent layers may be provided in a different format\n\t\t\t\t(jpeg, png, etc.).\n\t\t\t\t\ngetTileMatrix()\treturns the appropriate tile matrix corresponding to a\n\t\t\t\tgiven resolution.\n\t\t\t\t\npullMosaic(layer , top , left , bottom , right , pull_year , pull_month , \npull_day, imagewidth, imageheight)\n\n\t\t\t\tpulls a single day's tiles. Here, top/bottom/left/right\n\t\t\t\tare the latitude and longitude of the edges of the requested\n\t\t\t\timage. The year, month, and day are 4 digit year/numerical\n\t\t\t\tmonth (1 to 12). imagewidth and imageheight specify the\n\t\t\t\tresolution of the requested image, which is rescaled\n\t\t\t\taccordingly.\n\t\t\t\t\npullMosaicStream(\n\t\t\t\tbox,\n\t\t\t\tstart_date,\n\t\t\t\tend_date,\n\t\t\t\tlayer,prefix=\"/tmp/image-\",\n\t\t\t\textension=\".jpg\",\n\t\t\t\toutput_size=(512,512)):\n \n\t\t\t\tpulls a series of images of the same place for a given\n\t\t\t\tset of dates and puts them into the specified directory.\n\t\t\t\tbox is a quadruple containing the edge latitude and\n\t\t\t\tlongitude in the order (left, top, right, bottom).\n\t\t\t\tThe start and end dates are given in SQL format, e.g.,\n\t\t\t\t\"2012-01-31\", the prefix should include both the directory\n\t\t\t\twhere the images will be stored and any beginning to the\n\t\t\t\tfilename, the extension will generally determine the image\n\t\t\t\tformat, and output_size (the size of the image) is a duple\n\t\t\t\t(width, height).\n\t\t\t\t\n\t\t\t\t\nloadStreamToIndexedArray(\n\t\t\t\tstart_date,\n\t\t\t\tend_date,prefix=\"/tmp/image-\",\n\t\t\t\textension=\".jpg\")\n\t\t\t\t\n \t\t\ttakes file set as created by pullMosaicStream() and creates \n \t\t\ta dictionary by date. Here, start_date is the date of the \n \t\t\tfirst image, in SQL format (e.g., \"2012-01-31\"); end_date is\n \t\t\tthe date of last image; prefix is the directory and file \n \t\t\tprefix of the images, and extension is any file extension \n \t\t\tafter the date, including the image type.\n\t\t\t\t", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://www.github.com/tavisbarr/tilescraper", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "TileScraper", "package_url": "https://pypi.org/project/TileScraper/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/TileScraper/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://www.github.com/tavisbarr/tilescraper" }, "release_url": "https://pypi.org/project/TileScraper/0.1.0/", "requires_dist": null, "requires_python": null, "summary": "This module pulls a panel of tile-composite images from MODIS satellites given latitude and longitude of the edges plus start and end dates.", "version": "0.1.0" }, "last_serial": 2222069, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "f7d00822dee858a449f4114fe4e3181b", "sha256": "901e59a2116298c99abfd36e709d2e7665ea6ddc10ef1b86531d34b436d3d068" }, "downloads": -1, "filename": "TileScraper-0.1.0-py2-none-any.whl", "has_sig": false, "md5_digest": "f7d00822dee858a449f4114fe4e3181b", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 5029, "upload_time": "2016-07-14T22:49:12", "url": "https://files.pythonhosted.org/packages/65/bd/9fa0cb387283197abad001aa86bd8afff794c31308a0fed880b140a7c006/TileScraper-0.1.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c8e9f708d344a107cb9d99fdcf8e742a", "sha256": "a01628c5dbd5e1875b74b62a5ba7f87de147edda96dea9723cbd40dafb0b2db2" }, "downloads": -1, "filename": "TileScraper-0.1.0.tar.gz", "has_sig": false, "md5_digest": "c8e9f708d344a107cb9d99fdcf8e742a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5722, "upload_time": "2016-07-14T22:49:09", "url": "https://files.pythonhosted.org/packages/be/8a/e8943b041f10cb75ceb726b8304ecdc888ea87de32b6f2563b7e35237218/TileScraper-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f7d00822dee858a449f4114fe4e3181b", "sha256": "901e59a2116298c99abfd36e709d2e7665ea6ddc10ef1b86531d34b436d3d068" }, "downloads": -1, "filename": "TileScraper-0.1.0-py2-none-any.whl", "has_sig": false, "md5_digest": "f7d00822dee858a449f4114fe4e3181b", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 5029, "upload_time": "2016-07-14T22:49:12", "url": "https://files.pythonhosted.org/packages/65/bd/9fa0cb387283197abad001aa86bd8afff794c31308a0fed880b140a7c006/TileScraper-0.1.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c8e9f708d344a107cb9d99fdcf8e742a", "sha256": "a01628c5dbd5e1875b74b62a5ba7f87de147edda96dea9723cbd40dafb0b2db2" }, "downloads": -1, "filename": "TileScraper-0.1.0.tar.gz", "has_sig": false, "md5_digest": "c8e9f708d344a107cb9d99fdcf8e742a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5722, "upload_time": "2016-07-14T22:49:09", "url": "https://files.pythonhosted.org/packages/be/8a/e8943b041f10cb75ceb726b8304ecdc888ea87de32b6f2563b7e35237218/TileScraper-0.1.0.tar.gz" } ] }