Skip to content

Commit

Permalink
Merge pull request #107 from ulmo-dev/feature/raster
Browse files Browse the repository at this point in the history
Add USGS NED and EROS raster services.
  • Loading branch information
dharhas committed Apr 27, 2015
2 parents 0b82f97 + 3e1e7f2 commit 8b2be5c
Show file tree
Hide file tree
Showing 26 changed files with 798 additions and 1 deletion.
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def run_tests(self):
install_requires=[
'appdirs>=1.2.0',
'beautifulsoup4>=4.1.3',
'geojson',
'isodate>=0.4.6',
'lxml>=2.3',
# mock is required for mocking pytables-related functionality when it doesn't exist
Expand Down
1 change: 1 addition & 0 deletions test/files/usgs/eros/attr_list.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"items": [{"ID": 0, "name": "AREA_NAME"}, {"ID": 1, "name": "RESOLUTION"}, {"ID": 2, "name": "UNITS"}, {"ID": 3, "name": "SQ_MI"}, {"ID": 4, "name": "SQ_KM"}, {"ID": 5, "name": "FEATURES"}, {"ID": 6, "name": "TYPE"}, {"ID": 7, "name": "STATE_NAME"}, {"ID": 8, "name": "NGTOC"}, {"ID": 9, "name": "STOR_LOC"}, {"ID": 10, "name": "STATE_ABR"}, {"ID": 11, "name": "PER_COV"}, {"ID": 12, "name": "QUAD_EQ"}, {"ID": 13, "name": "AVAI_SDDS"}, {"ID": 14, "name": "GB_RAW"}, {"ID": 15, "name": "GB_SDE"}, {"ID": 16, "name": "USE_RESTRC"}, {"ID": 17, "name": "PROJECTION"}, {"ID": 18, "name": "SOURCE"}, {"ID": 19, "name": "STATUS"}, {"ID": 20, "name": "AVAI_NGTOC"}, {"ID": 21, "name": "AVAI_TDDS"}, {"ID": 22, "name": "REMV_SDDS"}, {"ID": 23, "name": "WMS_LYR"}, {"ID": 24, "name": "WMS_SRVC"}, {"ID": 25, "name": "WMS_SRVR"}, {"ID": 26, "name": "WMS_URL"}, {"ID": 27, "name": "META_URL"}, {"ID": 28, "name": "U_SCALE"}, {"ID": 29, "name": "L_SCALE"}, {"ID": 30, "name": "FEMA_WT"}, {"ID": 31, "name": "SEAMTITLE"}, {"ID": 32, "name": "PRODUCTKEY"}, {"ID": 33, "name": "BBOX_WSEN"}, {"ID": 34, "name": "ACQ_MONTH"}, {"ID": 35, "name": "ACQ_YEAR"}, {"ID": 36, "name": "Shape_Leng"}, {"ID": 37, "name": "LYR_URL"}], "identifier": "ID", "label": "name"}
1 change: 1 addition & 0 deletions test/files/usgs/eros/attributes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"items": [{"ID": 0, "name": "AREA_NAME"}, {"ID": 1, "name": "RESOLUTION"}, {"ID": 2, "name": "UNITS"}, {"ID": 3, "name": "SQ_MI"}, {"ID": 4, "name": "SQ_KM"}, {"ID": 5, "name": "FEATURES"}, {"ID": 6, "name": "TYPE"}, {"ID": 7, "name": "STATE_NAME"}, {"ID": 8, "name": "NGTOC"}, {"ID": 9, "name": "STOR_LOC"}, {"ID": 10, "name": "STATE_ABR"}, {"ID": 11, "name": "PER_COV"}, {"ID": 12, "name": "QUAD_EQ"}, {"ID": 13, "name": "AVAI_SDDS"}, {"ID": 14, "name": "GB_RAW"}, {"ID": 15, "name": "GB_SDE"}, {"ID": 16, "name": "USE_RESTRC"}, {"ID": 17, "name": "PROJECTION"}, {"ID": 18, "name": "SOURCE"}, {"ID": 19, "name": "STATUS"}, {"ID": 20, "name": "AVAI_NGTOC"}, {"ID": 21, "name": "AVAI_TDDS"}, {"ID": 22, "name": "REMV_SDDS"}, {"ID": 23, "name": "WMS_LYR"}, {"ID": 24, "name": "WMS_SRVC"}, {"ID": 25, "name": "WMS_SRVR"}, {"ID": 26, "name": "WMS_URL"}, {"ID": 27, "name": "META_URL"}, {"ID": 28, "name": "U_SCALE"}, {"ID": 29, "name": "L_SCALE"}, {"ID": 30, "name": "FEMA_WT"}, {"ID": 31, "name": "SEAMTITLE"}, {"ID": 32, "name": "PRODUCTKEY"}, {"ID": 33, "name": "BBOX_WSEN"}, {"ID": 34, "name": "ACQ_MONTH"}, {"ID": 35, "name": "ACQ_YEAR"}, {"ID": 36, "name": "Shape_Leng"}, {"ID": 37, "name": "LYR_URL"}], "identifier": "ID", "label": "name"}
1 change: 1 addition & 0 deletions test/files/usgs/eros/availability_bbox_test_set_1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"REQUEST_SERVICE_RESPONSE":{"PIECE":[{"BBOX":{"BOTTOM":35.9999999991025,"RIGHT":-75,"TOP":38.9999999990771,"LEFT":-78},"THUMBNAIL_URL":"Not Available","METADATA_URL":"Not Available","ID":"L1L_2001/landcover/conus/NLCD2001_LC_N36W075_v2","DOWNLOAD_URL":"http://gisdata.usgs.gov/TDDS/DownloadFile.php?TYPE=NLCD&FNAME=2001/landcover/conus/NLCD2001_LC_N36W075_v2.zip&ORIG=RVS"},{"BBOX":{"BOTTOM":32.9999999991377,"RIGHT":-75,"TOP":35.9999999991025,"LEFT":-78},"THUMBNAIL_URL":"Not Available","METADATA_URL":"Not Available","ID":"L1L_2001/landcover/conus/NLCD2001_LC_N33W075_v2","DOWNLOAD_URL":"http://gisdata.usgs.gov/TDDS/DownloadFile.php?TYPE=NLCD&FNAME=2001/landcover/conus/NLCD2001_LC_N33W075_v2.zip&ORIG=RVS"}]}}
1 change: 1 addition & 0 deletions test/files/usgs/eros/datasets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"items": [{"AREA_NAME": "201108 Hurricane Irene", "ID": 0}, {"AREA_NAME": "201210 Hurricane Sandy", "ID": 1}, {"AREA_NAME": "Lower 48 United States", "ID": 2}, {"AREA_NAME": "48 Conterminous United States", "ID": 3}, {"AREA_NAME": "Beaufort County", "ID": 4}, {"AREA_NAME": "Brunswick County", "ID": 5}, {"AREA_NAME": "Duplin County", "ID": 6}, {"AREA_NAME": "Pitt County", "ID": 7}, {"AREA_NAME": "Greene County", "ID": 8}, {"AREA_NAME": "Jones County", "ID": 9}, {"AREA_NAME": "Pender County", "ID": 10}, {"AREA_NAME": "Dare County", "ID": 11}, {"AREA_NAME": "New Hanover County", "ID": 12}, {"AREA_NAME": "Bertie County", "ID": 13}, {"AREA_NAME": "Pamilco County", "ID": 14}, {"AREA_NAME": "Chowan County", "ID": 15}, {"AREA_NAME": "Craven County", "ID": 16}, {"AREA_NAME": "Carteret County", "ID": 17}, {"AREA_NAME": "Edgecombe County", "ID": 18}, {"AREA_NAME": "Halifax County", "ID": 19}, {"AREA_NAME": "Hyde County", "ID": 20}, {"AREA_NAME": "Onslow County", "ID": 21}, {"AREA_NAME": "Lenoir County", "ID": 22}, {"AREA_NAME": "Martin County", "ID": 23}, {"AREA_NAME": "Nash County", "ID": 24}, {"AREA_NAME": "Tyrrell County", "ID": 25}, {"AREA_NAME": "Washington County", "ID": 26}, {"AREA_NAME": "Wayne County", "ID": 27}, {"AREA_NAME": "Wilson County", "ID": 28}, {"AREA_NAME": "Myrtle Beach / Wilmington", "ID": 29}], "identifier": "ID", "label": "ID"}
1 change: 1 addition & 0 deletions test/files/usgs/eros/formats_l1l.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"items": [{"outputformat": "02-GeoTIFF", "metadataformat": "A-ALL", "compressionformat": "Z-ZIP", "type": "TDDS", "ID": 0, "productid": "L1L"}], "identifier": "ID", "label": "productid"}
1 change: 1 addition & 0 deletions test/files/usgs/eros/formats_ncp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"items": [], "identifier": "ID", "label": "productid"}
1 change: 1 addition & 0 deletions test/files/usgs/eros/get_raster_test_availability.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"REQUEST_SERVICE_RESPONSE":{"PIECE":[{"BBOX":{"BOTTOM":31.9341277,"RIGHT":-97.9334583,"TOP":32.0033416,"LEFT":-98.0040666},"THUMBNAIL_URL":"http://earthexplorer.usgs.gov/browse/naip/fullres/TX/2012/201204_texas_naip_1x0000m_cnir/31097/m_3109701_nw_14_1_20120725.jpg","METADATA_URL":"Not Available","ID":"NCP_http://tdds2.cr.usgs.gov/lta5/ortho/naip/compressed/TX/2012/201204_texas_naip_1x0000m_cnir/31097/m_3109701_nw_14_1_20120725_20121015.jp2","DOWNLOAD_URL":"http://tdds2.cr.usgs.gov/lta5/ortho/naip/compressed/TX/2012/201204_texas_naip_1x0000m_cnir/31097/m_3109701_nw_14_1_20120725_20121015.jp2"}]}}
Binary file not shown.
1 change: 1 addition & 0 deletions test/files/usgs/eros/themes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"items": [{"themename": "Boundaries", "type": "SDDS", "ID": 0, "themeid": "2"}, {"themename": "Elevation", "type": "SDDS", "ID": 1, "themeid": "11"}, {"themename": "Orthoimagery", "type": "SDDS", "ID": 2, "themeid": "10"}, {"themename": "Hydrography", "type": "SDDS", "ID": 3, "themeid": "4"}, {"themename": "Amphibian Research and Monitoring Initiative (ARMI)", "type": "SDDS", "ID": 4, "themeid": "14"}, {"themename": "Transportation", "type": "SDDS", "ID": 5, "themeid": "3"}, {"themename": "Land Cover", "type": "SDDS", "ID": 6, "themeid": "13"}, {"themename": "Miscellaneous National Atlas", "type": "SDDS", "ID": 7, "themeid": "15"}, {"themename": "Scanned Maps", "type": "SDDS", "ID": 8, "themeid": "16"}, {"themename": "Famine Early Warning System (FEWS)", "type": "SDDS", "ID": 9, "themeid": "17"}, {"themename": "Greenness", "type": "SDDS", "ID": 10, "themeid": "18"}, {"themename": "Populated Places", "type": "SDDS", "ID": 11, "themeid": "20"}, {"themename": "Geology", "type": "SDDS", "ID": 12, "themeid": "27"}, {"themename": "Satellite Imagery", "type": "SDDS", "ID": 13, "themeid": "32"}, {"themename": "Weather / Climate", "type": "SDDS", "ID": 14, "themeid": "34"}, {"themename": "Afghanistan", "type": "SDDS", "ID": 15, "themeid": "35"}, {"themename": "Antarctica", "type": "SDDS", "ID": 16, "themeid": "37"}, {"themename": "Elevation", "type": "TDDS", "ID": 17, "themeid": "11"}, {"themename": "Orthoimagery", "type": "TDDS", "ID": 18, "themeid": "10"}, {"themename": "Satellite Imagery", "type": "TDDS", "ID": 19, "themeid": "32"}, {"themename": "Emergency Operations", "type": "TDDS", "ID": 20, "themeid": "41"}, {"themename": "Land Cover", "type": "TDDS", "ID": 21, "themeid": "13"}], "identifier": "ID", "label": "themename"}
1 change: 1 addition & 0 deletions test/files/usgs/ned/availability_bbox_test_set_1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"total":7,"took":"23ms","selflink":{"rel":"self","url":"https://www.sciencebase.gov/catalog/items?max=1000&q=&format=json&filter=tags%3DNational+Elevation+Dataset+%28NED%29+1+arc-second&filter=tags%3DIMG&filter=spatialQuery%3DPolygon+%28%28-79.68433821243661+34.79806472893675%2C-79.68433821243661+32.81417227179455%2C-77.42742156945509+32.81417227179455%2C-77.42742156945509+34.79806472893675%2C-79.68433821243661+34.79806472893675%29%29&fields=webLinks%2Cspatial%2Ctitle"},"items":[{"link":{"rel":"self","url":"https://www.sciencebase.gov/catalog/item/531f2632e4b0193009ddbf2d"},"relatedItems":{"link":{"url":"https://www.sciencebase.gov/catalog/itemLinks?itemId=531f2632e4b0193009ddbf2d","rel":"related"}},"id":"531f2632e4b0193009ddbf2d","title":"USGS NED n34w080 1 arc-second 2013 1 x 1 degree IMG","webLinks":[{"type":"Online Link","uri":"http://ned.usgs.gov/","rel":"related","hidden":false},{"type":"Online Link","uri":"http://nationalmap.gov/viewer.html","rel":"related","hidden":false},{"type":"browseImage","uri":"ftp://rockyftp.cr.usgs.gov/vdelivery/Datasets/Staged/NED/1/IMG/imgn34w080_1_thumb.jpg","rel":"related","title":"Thumbnail JPG image","hidden":false},{"type":"download","uri":"ftp://rockyftp.cr.usgs.gov/vdelivery/Datasets/Staged/NED/1/IMG/n34w080.zip","rel":"related","title":"IMG","hidden":false,"length":34342404}],"spatial":{"boundingBox":{"minX":-80.00166666667,"maxX":-78.99833333334,"minY":32.99833333333,"maxY":34.00166666666}}},{"link":{"rel":"self","url":"https://www.sciencebase.gov/catalog/item/531f2638e4b0193009ddbfd5"},"relatedItems":{"link":{"url":"https://www.sciencebase.gov/catalog/itemLinks?itemId=531f2638e4b0193009ddbfd5","rel":"related"}},"id":"531f2638e4b0193009ddbfd5","title":"USGS NED n33w080 1 arc-second 2013 1 x 1 degree IMG","webLinks":[{"type":"Online Link","uri":"http://ned.usgs.gov/","rel":"related","hidden":false},{"type":"Online Link","uri":"http://nationalmap.gov/viewer.html","rel":"related","hidden":false},{"type":"browseImage","uri":"ftp://rockyftp.cr.usgs.gov/vdelivery/Datasets/Staged/NED/1/IMG/imgn33w080_1_thumb.jpg","rel":"related","title":"Thumbnail JPG image","hidden":false},{"type":"download","uri":"ftp://rockyftp.cr.usgs.gov/vdelivery/Datasets/Staged/NED/1/IMG/n33w080.zip","rel":"related","title":"IMG","hidden":false,"length":3624203}],"spatial":{"boundingBox":{"minX":-80.00166666667,"maxX":-78.99833333334,"minY":31.99833333333,"maxY":33.00166666666}}},{"link":{"rel":"self","url":"https://www.sciencebase.gov/catalog/item/531f2626e4b0193009ddbe79"},"relatedItems":{"link":{"url":"https://www.sciencebase.gov/catalog/itemLinks?itemId=531f2626e4b0193009ddbe79","rel":"related"}},"id":"531f2626e4b0193009ddbe79","title":"USGS NED n35w079 1 arc-second 2013 1 x 1 degree IMG","webLinks":[{"type":"Online Link","uri":"http://ned.usgs.gov/","rel":"related","hidden":false},{"type":"Online Link","uri":"http://nationalmap.gov/viewer.html","rel":"related","hidden":false},{"type":"browseImage","uri":"ftp://rockyftp.cr.usgs.gov/vdelivery/Datasets/Staged/NED/1/IMG/imgn35w079_1_thumb.jpg","rel":"related","title":"Thumbnail JPG image","hidden":false},{"type":"download","uri":"ftp://rockyftp.cr.usgs.gov/vdelivery/Datasets/Staged/NED/1/IMG/n35w079.zip","rel":"related","title":"IMG","hidden":false,"length":43369778}],"spatial":{"boundingBox":{"minX":-79.00166666667,"maxX":-77.99833333334,"minY":33.99833333333,"maxY":35.00166666666}}},{"link":{"rel":"self","url":"https://www.sciencebase.gov/catalog/item/531f2633e4b0193009ddbf35"},"relatedItems":{"link":{"url":"https://www.sciencebase.gov/catalog/itemLinks?itemId=531f2633e4b0193009ddbf35","rel":"related"}},"id":"531f2633e4b0193009ddbf35","title":"USGS NED n34w078 1 arc-second 2013 1 x 1 degree IMG","webLinks":[{"type":"Online Link","uri":"http://ned.usgs.gov/","rel":"related","hidden":false},{"type":"Online Link","uri":"http://nationalmap.gov/viewer.html","rel":"related","hidden":false},{"type":"browseImage","uri":"ftp://rockyftp.cr.usgs.gov/vdelivery/Datasets/Staged/NED/1/IMG/imgn34w078_1_thumb.jpg","rel":"related","title":"Thumbnail JPG image","hidden":false},{"type":"download","uri":"ftp://rockyftp.cr.usgs.gov/vdelivery/Datasets/Staged/NED/1/IMG/n34w078.zip","rel":"related","title":"IMG","hidden":false,"length":509645}],"spatial":{"boundingBox":{"minX":-78.00166666667,"maxX":-76.99833333334,"minY":32.99833333333,"maxY":34.00166666666}}},{"link":{"rel":"self","url":"https://www.sciencebase.gov/catalog/item/531f2626e4b0193009ddbe75"},"relatedItems":{"link":{"url":"https://www.sciencebase.gov/catalog/itemLinks?itemId=531f2626e4b0193009ddbe75","rel":"related"}},"id":"531f2626e4b0193009ddbe75","title":"USGS NED n35w080 1 arc-second 2013 1 x 1 degree IMG","webLinks":[{"type":"Online Link","uri":"http://ned.usgs.gov/","rel":"related","hidden":false},{"type":"Online Link","uri":"http://nationalmap.gov/viewer.html","rel":"related","hidden":false},{"type":"browseImage","uri":"ftp://rockyftp.cr.usgs.gov/vdelivery/Datasets/Staged/NED/1/IMG/imgn35w080_1_thumb.jpg","rel":"related","title":"Thumbnail JPG image","hidden":false},{"type":"download","uri":"ftp://rockyftp.cr.usgs.gov/vdelivery/Datasets/Staged/NED/1/IMG/n35w080.zip","rel":"related","title":"IMG","hidden":false,"length":42645693}],"spatial":{"boundingBox":{"minX":-80.00166666667,"maxX":-78.99833333334,"minY":33.99833333333,"maxY":35.00166666666}}},{"link":{"rel":"self","url":"https://www.sciencebase.gov/catalog/item/531f2633e4b0193009ddbf31"},"relatedItems":{"link":{"url":"https://www.sciencebase.gov/catalog/itemLinks?itemId=531f2633e4b0193009ddbf31","rel":"related"}},"id":"531f2633e4b0193009ddbf31","title":"USGS NED n34w079 1 arc-second 2013 1 x 1 degree IMG","webLinks":[{"type":"Online Link","uri":"http://ned.usgs.gov/","rel":"related","hidden":false},{"type":"Online Link","uri":"http://nationalmap.gov/viewer.html","rel":"related","hidden":false},{"type":"browseImage","uri":"ftp://rockyftp.cr.usgs.gov/vdelivery/Datasets/Staged/NED/1/IMG/imgn34w079_1_thumb.jpg","rel":"related","title":"Thumbnail JPG image","hidden":false},{"type":"download","uri":"ftp://rockyftp.cr.usgs.gov/vdelivery/Datasets/Staged/NED/1/IMG/n34w079.zip","rel":"related","title":"IMG","hidden":false,"length":7586413}],"spatial":{"boundingBox":{"minX":-79.00166666667,"maxX":-77.99833333334,"minY":32.99833333333,"maxY":34.00166666666}}},{"link":{"rel":"self","url":"https://www.sciencebase.gov/catalog/item/531f2626e4b0193009ddbe7d"},"relatedItems":{"link":{"url":"https://www.sciencebase.gov/catalog/itemLinks?itemId=531f2626e4b0193009ddbe7d","rel":"related"}},"id":"531f2626e4b0193009ddbe7d","title":"USGS NED n35w078 1 arc-second 2013 1 x 1 degree IMG","webLinks":[{"type":"Online Link","uri":"http://ned.usgs.gov/","rel":"related","hidden":false},{"type":"Online Link","uri":"http://nationalmap.gov/viewer.html","rel":"related","hidden":false},{"type":"browseImage","uri":"ftp://rockyftp.cr.usgs.gov/vdelivery/Datasets/Staged/NED/1/IMG/imgn35w078_1_thumb.jpg","rel":"related","title":"Thumbnail JPG image","hidden":false},{"type":"download","uri":"ftp://rockyftp.cr.usgs.gov/vdelivery/Datasets/Staged/NED/1/IMG/n35w078.zip","rel":"related","title":"IMG","hidden":false,"length":26451090}],"spatial":{"boundingBox":{"minX":-78.00166666667,"maxX":-76.99833333334,"minY":33.99833333333,"maxY":35.00166666666}}}]}
Loading

0 comments on commit 8b2be5c

Please sign in to comment.