57 national map
Downloading various shapes from the National Map¶
The national map (TNM) is a catalog of topological datasources maintained by the USGS.
- It contains a wide range of dataformats (such as GeoTiff, LAZ, ...) and datasets.
- It provides an endpoint that can be used to search for published datasets and files.
- This API supports a wide range of searchable parameters (bounding box, polygon, dates, keyword, ...)
- It returns detailed information regarding the properties of datasets, file,
- as well as various download links (file, thumbnail, xml descriptions, ...).
We've created a thin wrapper to expose this treasure trove.
- For more details about TNM, see https://apps.nationalmap.gov/tnmaccess/#/
- The same data is also downloable using https://apps.nationalmap.gov/downloader/
In [1]:
Copied!
# !pip install leafmap
# !pip install leafmap
In [2]:
Copied!
import leafmap
import leafmap
Usage¶
A class groups the functionalities together.
In [3]:
Copied!
TNM = leafmap.The_national_map_USGS()
TNM = leafmap.The_national_map_USGS()
Datasets¶
In [4]:
Copied!
TNM.datasets
TNM.datasets
Out[4]:
{'Alaska IFSAR 5 meter DEM', 'Digital Elevation Model (DEM) 1 meter', 'Ifsar Digital Surface Model (DSM)', 'Ifsar Orthorectified Radar Image (ORI)', 'Lidar Point Cloud (LPC)', 'National Elevation Dataset (NED) 1 arc-second', 'National Elevation Dataset (NED) 1/3 arc-second', 'National Elevation Dataset (NED) 1/3 arc-second - Contours', 'National Elevation Dataset (NED) 1/9 arc-second', 'National Elevation Dataset (NED) Alaska 2 arc-second', 'National Hydrography Dataset (NHD) Best Resolution', 'National Hydrography Dataset Plus High Resolution (NHDPlus HR)', 'National Watershed Boundary Dataset (WBD)', 'Original Product Resolution (OPR) Digital Elevation Model (DEM)', 'Small-scale Datasets - Boundaries', 'Small-scale Datasets - Contours', 'Small-scale Datasets - Hydrography', 'Small-scale Datasets - Transportation', 'Topobathymetric Lidar DEM', 'Topobathymetric Lidar Point Cloud', 'US Topo Current', 'US Topo Historical'}
Formats¶
Note that any format (f.e. 'All') is specific to one or more datasets.
In [5]:
Copied!
TNM.prodFormats
TNM.prodFormats
Out[5]:
{'All', 'FileGDB', 'GeoPDF', 'GeoPackage', 'GeoTIFF', 'GeoTIFF, IMG', 'JPEG2000', 'LAS,LAZ', 'Shapefile', 'TIFF', 'TXT (pipes)'}
Looking for files¶
In [6]:
Copied!
TNM.find_details().keys(), TNM.find_details()['total']
TNM.find_details().keys(), TNM.find_details()['total']
Out[6]:
(dict_keys(['total', 'items', 'errors', 'messages', 'sciencebaseQuery', 'filteredOut']), 12440464)
A detail¶
In [7]:
Copied!
TNM.find_details()['items'][0]
TNM.find_details()['items'][0]
Out[7]:
{'title': '18TWK610820', 'moreInfo': 'Lidar (Light detection and ranging) discrete-return point cloud data are available in the American Society for Photogrammetry and Remote Sensing (ASPRS) LAS format. The LAS format is a standardized binary format for storing 3-dimensional point cloud data and point attributes along with header information and variable length records specific to the data. Millions of data points are stored as a 3-dimensional data cloud as a series of x (longitude), y (latitude) and z (elevation) points. A few older projects in this collection are in ASCII format. Please refer to http://www.asprs.org/Committee-General/LASer-LAS-File-Format-Exchange-Activities.html for additional information. This data set is a LAZ (compressed LAS) format file containing [...]', 'sourceId': '6338596ad34e900e86cdbfd3', 'sourceName': 'ScienceBase', 'sourceOriginId': None, 'sourceOriginName': 'gda', 'metaUrl': 'https://www.sciencebase.gov/catalog/item/6338596ad34e900e86cdbfd3', 'vendorMetaUrl': 'https://prd-tnm.s3.amazonaws.com/index.html?prefix=StagedProducts/Elevation/metadata/NJ_New_Jersey_SANDY_LiDAR_15/NJ_SdL5_2014', 'publicationDate': '2015-05-03', 'lastUpdated': '2022-10-01T09:14:53.711-06:00', 'dateCreated': '2022-10-01T09:14:50.910-06:00', 'sizeInBytes': 31830199, 'extent': 'Varies', 'format': 'LAZ', 'downloadURL': 'https://rockyweb.usgs.gov/vdelivery/Datasets/Staged/Elevation/LPC/Projects/USGS_Lidar_Point_Cloud_NJ_SdL5_2014_LAS_2015/laz/18TWK610820.laz', 'downloadURLRaster': None, 'previewGraphicURL': 'https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/LPC/Projects/USGS_Lidar_Point_Cloud_NJ_SdL5_2014_LAS_2015/browse/18TWK610820.jpg', 'downloadLazURL': 'https://rockyweb.usgs.gov/vdelivery/Datasets/Staged/Elevation/LPC/Projects/USGS_Lidar_Point_Cloud_NJ_SdL5_2014_LAS_2015/laz/18TWK610820.laz', 'urls': {'LAZ': 'https://rockyweb.usgs.gov/vdelivery/Datasets/Staged/Elevation/LPC/Projects/USGS_Lidar_Point_Cloud_NJ_SdL5_2014_LAS_2015/laz/18TWK610820.laz'}, 'datasets': [], 'boundingBox': {'minX': -74.2802466122605, 'maxX': -74.2624014212519, 'minY': 40.4863433374492, 'maxY': 40.4999672066248}, 'bestFitIndex': 0.0, 'body': "Lidar (Light detection and ranging) discrete-return point cloud data are available in the American Society for Photogrammetry and Remote Sensing (ASPRS) LAS format. The LAS format is a standardized binary format for storing 3-dimensional point cloud data and point attributes along with header information and variable length records specific to the data. Millions of data points are stored as a 3-dimensional data cloud as a series of x (longitude), y (latitude) and z (elevation) points. A few older projects in this collection are in ASCII format. Please refer to http://www.asprs.org/Committee-General/LASer-LAS-File-Format-Exchange-Activities.html for additional information. This data set is a LAZ (compressed LAS) format file containing lidar point cloud data. Compression to an LAZ file was done with the LAStools 'laszip' program and can be unzipped with the same free program (laszip.org).", 'processingUrl': 'processingUrl', 'modificationInfo': '2022-10-01'}
Using parameters¶
In [8]:
Copied!
params = {
'q': 'National Elevation Dataset (NED) 1/3 arc-second',
'polyCode': '01010002',
'polyType': 'huc8',
}
TNM.find_details(**params)['total']
params = {
'q': 'National Elevation Dataset (NED) 1/3 arc-second',
'polyCode': '01010002',
'polyType': 'huc8',
}
TNM.find_details(**params)['total']
Out[8]:
25
In [9]:
Copied!
params = {
'prodFormats': 'LAS,LAZ',
'datasets': 'Lidar Point Cloud (LPC)',
'polygon': [
(-104.94262695312236, 41.52867510196275),
(-102.83325195312291, 40.45065268246805),
(-104.94262695312236, 40.45065268246805),
(-104.94262695312236, 41.52867510196275),
],
}
TNM.find_details(**params)['total']
params = {
'prodFormats': 'LAS,LAZ',
'datasets': 'Lidar Point Cloud (LPC)',
'polygon': [
(-104.94262695312236, 41.52867510196275),
(-102.83325195312291, 40.45065268246805),
(-104.94262695312236, 40.45065268246805),
(-104.94262695312236, 41.52867510196275),
],
}
TNM.find_details(**params)['total']
Out[9]:
13837
Available parameters
In [10]:
Copied!
help(TNM.find_details)
help(TNM.find_details)
Help on method find_details in module leafmap.common: find_details(bbox: List[float] = None, polygon: List[Tuple[float, float]] = None, datasets: str = None, prodFormats: str = None, prodExtents: str = None, q: str = None, dateType: str = None, start: str = None, end: str = None, offset: int = 0, max: int = None, outputFormat: str = 'JSON', polyType: str = None, polyCode: str = None, extentQuery: int = None) -> Dict method of leafmap.common.The_national_map_USGS instance Possible search parameters (kwargs) support by API Parameter Values Description --------------------------------------------------------------------------------------------------- bbox 'minx, miny, maxx, maxy' Geographic longitude/latitude values expressed in decimal degrees in a comma-delimited list. polygon '[x,y x,y x,y x,y x,y]' Polygon, longitude/latitude values expressed in decimal degrees in a space-delimited list. datasets See: Datasets (Optional) Dataset tag name (sbDatasetTag) From https://apps.nationalmap.gov/tnmaccess/#/product prodFormats See: Product Formats (Optional) Dataset-specific format prodExtents See: Product Extents (Optional) Dataset-specific extent q free text Text input which can be used to filter by product titles and text descriptions. dateType dateCreated | lastUpdated | Publication Type of date to search by. start 'YYYY-MM-DD' Start date end 'YYYY-MM-DD' End date (required if start date is provided) offset integer Offset into paginated results - default=0 max integer Number of results returned outputFormat JSON | CSV | pjson Default=JSON polyType state | huc2 | huc4 | huc8 Well Known Polygon Type. Use this parameter to deliver data by state or HUC (hydrologic unit codes defined by the Watershed Boundary Dataset/WBD) polyCode state FIPS code or huc number Well Known Polygon Code. This value needs to coordinate with the polyType parameter. extentQuery integer A Polygon code in the science base system, typically from an uploaded shapefile
Max items¶
Defaults to about 50. You only retrieve about 1000 items in one call.
In [11]:
Copied!
len(TNM.find_details()['items'])
len(TNM.find_details()['items'])
Out[11]:
50
In [12]:
Copied!
len(TNM.find_details(max=1000000)['items'])
len(TNM.find_details(max=1000000)['items'])
Out[12]:
998
Use offset to retrieve more batches.
In [13]:
Copied!
params = {
'q': 'National Elevation Dataset (NED) 1/3 arc-second',
'polyCode': '01010002',
'polyType': 'huc8',
'max': 2,
}
TNM.find_details(**params, offset=0)['items'][0] == TNM.find_details(
**params, offset=1
)['items'][0]
params = {
'q': 'National Elevation Dataset (NED) 1/3 arc-second',
'polyCode': '01010002',
'polyType': 'huc8',
'max': 2,
}
TNM.find_details(**params, offset=0)['items'][0] == TNM.find_details(
**params, offset=1
)['items'][0]
Out[13]:
False
Select a region from leafmap¶
In [14]:
Copied!
m = leafmap.Map(center=[40, -100], zoom=4)
m
m = leafmap.Map(center=[40, -100], zoom=4)
m
Out[14]:
In [15]:
Copied!
region = m.user_roi_bounds()
if region is None:
region = [-115.9689, 35.9758, -115.3619, 36.4721]
region = m.user_roi_bounds()
if region is None:
region = [-115.9689, 35.9758, -115.3619, 36.4721]
The folium plotting backend does not support this function.
In [16]:
Copied!
TNM.find_details(q='LAZ', bbox=region)['total']
TNM.find_details(q='LAZ', bbox=region)['total']
Out[16]:
313
Error handling¶
In [17]:
Copied!
bool(TNM.find_details(start="01-01-2010", q="NED", bbox=region))
bool(TNM.find_details(start="01-01-2010", q="NED", bbox=region))
Expecting property name enclosed in double quotes: line 1 column 2 (char 1)
Out[17]:
False
In [18]:
Copied!
bool(TNM.find_details(start='2021-12-01', end='2020-01-01', q='NED', bbox=region))
bool(TNM.find_details(start='2021-12-01', end='2020-01-01', q='NED', bbox=region))
Expecting property name enclosed in double quotes: line 1 column 2 (char 1)
Out[18]:
False
In [19]:
Copied!
bool(TNM.find_details(start='2021-12-01', end='2022-01-01', q='NED', bbox=region))
bool(TNM.find_details(start='2021-12-01', end='2022-01-01', q='NED', bbox=region))
Expecting property name enclosed in double quotes: line 1 column 2 (char 1)
Out[19]:
False
In [20]:
Copied!
bool(
TNM.find_details(
start='2020-12-01',
end='2022-01-01',
q='NED',
dateType='dateCreated',
bbox=region,
)
)
bool(
TNM.find_details(
start='2020-12-01',
end='2022-01-01',
q='NED',
dateType='dateCreated',
bbox=region,
)
)
Out[20]:
True
Downloading files¶
In [21]:
Copied!
help(TNM.download_tiles)
help(TNM.download_tiles)
Help on method download_tiles in module leafmap.common: download_tiles(region=None, out_dir=None, download_args={}, geopandas_args={}, API={}) -> None method of leafmap.common.The_national_map_USGS instance Download the US National Elevation Datasets (NED) for a region. Args: region (str | list, optional): An URL|filepath to a vector dataset Or a list of bounds in the form of [minx, miny, maxx, maxy]. Alternatively you could use API parameters such as polygon or bbox. out_dir (str, optional): The directory to download the files to. Defaults to None, which uses the current working directory. download_args (dict, optional): A dictionary of arguments to pass to the download_file function. Defaults to {}. geopandas_args (dict, optional): A dictionary of arguments to pass to the geopandas.read_file() function. Used for reading a region URL|filepath. API (dict, optional): A dictionary of arguments to pass to the self.find_details() function. Exposes most of the documented API. Defaults to {}. Returns: None
In [22]:
Copied!
params = {
'q': 'National Elevation Dataset (NED) 1/3 arc-second',
'polyCode': '01010002',
'polyType': 'huc8',
'max': 0,
}
TNM.download_tiles(API=params)
params = {
'q': 'National Elevation Dataset (NED) 1/3 arc-second',
'polyCode': '01010002',
'polyType': 'huc8',
'max': 0,
}
TNM.download_tiles(API=params)
It can also be accessed without invoking the class.
In [23]:
Copied!
params = {
'q': 'National Elevation Dataset (NED) 1/3 arc-second',
'polyCode': '01010002',
'polyType': 'huc8',
'max': 0,
}
leafmap.download_tnm(API=params)
params = {
'q': 'National Elevation Dataset (NED) 1/3 arc-second',
'polyCode': '01010002',
'polyType': 'huc8',
'max': 0,
}
leafmap.download_tnm(API=params)
In [24]:
Copied!
region = [-115.9689, 35.9758, -115.3619, 36.4721]
leafmap.download_ned(region=region, return_url=True) == leafmap.download_tnm(
region=region, return_url=True, API={'q': 'NED'}
)
region = [-115.9689, 35.9758, -115.3619, 36.4721]
leafmap.download_ned(region=region, return_url=True) == leafmap.download_tnm(
region=region, return_url=True, API={'q': 'NED'}
)
Out[24]:
True
List of files¶
In [25]:
Copied!
TNM.find_tiles(API=params)
TNM.find_tiles(API=params)
Out[25]:
['https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/1/TIFF/historical/n47w069/USGS_1_n47w069_20210611.tif', 'https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/1/TIFF/historical/n47w070/USGS_1_n47w070_20210611.tif', 'https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/1/TIFF/historical/n48w069/USGS_1_n48w069_20210611.tif', 'https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/1/TIFF/historical/n48w070/USGS_1_n48w070_20210611.tif', 'https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/1/TIFF/historical/n47w069/USGS_1_n47w069_20190930.tif', 'https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/1/TIFF/historical/n47w070/USGS_1_n47w070_20190430.tif', 'https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/1/TIFF/historical/n48w069/USGS_1_n48w069_20130911.tif', 'https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/1/TIFF/historical/n48w070/USGS_1_n48w070_20130911.tif', 'https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/13/TIFF/historical/n47w069/USGS_13_n47w069_20210611.tif', 'https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/13/TIFF/historical/n47w070/USGS_13_n47w070_20210611.tif', 'https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/13/TIFF/historical/n48w069/USGS_13_n48w069_20210611.tif', 'https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/13/TIFF/historical/n48w070/USGS_13_n48w070_20210611.tif', 'https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/13/TIFF/historical/n47w069/USGS_13_n47w069_20190930.tif', 'https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/13/TIFF/historical/n47w070/USGS_13_n47w070_20190430.tif', 'https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/13/TIFF/historical/n48w069/USGS_13_n48w069_20130911.tif', 'https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/13/TIFF/historical/n48w070/USGS_13_n48w070_20130911.tif', 'https://prd-tnm.s3.amazonaws.com/StagedProducts/Contours/National/GDB/Elevation_National_GDB.zip', 'https://prd-tnm.s3.amazonaws.com/StagedProducts/Contours/GDB/ELEV_Edmundston_E_ME_1X1_GDB.zip', 'https://prd-tnm.s3.amazonaws.com/StagedProducts/Contours/Shape/ELEV_Edmundston_E_ME_1X1_Shape.zip', 'https://prd-tnm.s3.amazonaws.com/StagedProducts/Contours/GDB/ELEV_Edmundston_W_ME_1X1_GDB.zip', 'https://prd-tnm.s3.amazonaws.com/StagedProducts/Contours/Shape/ELEV_Edmundston_W_ME_1X1_Shape.zip', 'https://prd-tnm.s3.amazonaws.com/StagedProducts/Contours/GDB/ELEV_Presque_Isle_E_ME_1X1_GDB.zip', 'https://prd-tnm.s3.amazonaws.com/StagedProducts/Contours/Shape/ELEV_Presque_Isle_E_ME_1X1_Shape.zip', 'https://prd-tnm.s3.amazonaws.com/StagedProducts/Contours/GDB/ELEV_Presque_Isle_W_ME_1X1_GDB.zip', 'https://prd-tnm.s3.amazonaws.com/StagedProducts/Contours/Shape/ELEV_Presque_Isle_W_ME_1X1_Shape.zip']
Dataset metadata¶
In [26]:
Copied!
TNM.datasets_full[0]
TNM.datasets_full[0]
Out[26]:
{'title': 'US Topo', 'sbDatasetTag': 'US Topo', 'parentCategory': 'Map', 'id': 'us-topo-main', 'description': 'Layered GeoPDF 7.5 Minute Quadrangle Map. Layers of geospatial data include orthoimagery, roads, grids, geographic names, elevation contours, hydrography, and other selected map features. This map depicts geographic features on the surface of the earth. One intended purpose is to support emergency response at all levels of government. The geospatial data in this map are from selected National Map data holdings and other government sources.', 'refreshCycle': 'Daily', 'lastPublishedDate': 'Sep 4, 2019', 'lastUpdatedDate': 'Sep 7, 2019', 'dataGovUrl': 'https://catalog.data.gov/dataset/usgs-us-topo-map-collection', 'infoUrl': 'https://www.sciencebase.gov/catalog/item/4f554236e4b018de15819c85', 'thumbnailUrl': 'https://thor-f5.er.usgs.gov/ngtoc/metadata/waf/collections/thumbnails/ms_tupelo_20150625.jpg', 'mapServerLayerIdsForLegend': [2], 'mapServerUrl': 'https://index.nationalmap.gov/arcgis/rest/services/USTopoAvailability/MapServer', 'showMapServerLink': True, 'mapServerLinkShowTitle': 'Show Availability', 'mapServerLinkHideTitle': 'Hide Availability', 'formats': [{'displayName': 'GeoPDF', 'value': 'GeoPDF,GeospatialPDF,Geospatial PDF', 'isDefault': True}], 'defaultExtent': '7.5 x 7.5 minute', 'tags': [{'title': 'US Topo Current', 'sbDatasetTag': 'US Topo Current', 'id': 'us-topo-curent', 'refreshCycle': 'Undetermined', 'lastPublishedDate': 'Sep 4, 2019', 'lastUpdatedDate': 'Sep 7, 2019', 'isChecked': True, 'dataGovUrl': '', 'infoUrl': 'https://www.sciencebase.gov/catalog/item/4f554236e4b018de15819c85', 'thumbnailUrl': 'https://thor-f5.er.usgs.gov/ngtoc/metadata/waf/collections/thumbnails/ms_tupelo_20150625.jpg', 'extents': ['7.5 x 7.5 minute']}, {'title': 'US Topo Non-Current', 'sbDatasetTag': 'US Topo Historical', 'id': 'us-topo-non-current', 'refreshCycle': 'Undetermined', 'lastPublishedDate': 'Jul 12, 2019', 'lastUpdatedDate': 'Sep 7, 2019', 'isChecked': False, 'dataGovUrl': 'https://www.sciencebase.gov/catalog/item/5061bc99e4b0ce47085a8d03', 'infoUrl': '', 'thumbnailUrl': 'https://thor-f5.er.usgs.gov/ngtoc/metadata/waf/collections/thumbnails/ms_tupelo_20150625.jpg', 'extents': ['7.5 x 7.5 minute']}]}
Read the docs¶
In [27]:
Copied!
help(TNM)
help(TNM)
Help on The_national_map_USGS in module leafmap.common object: class The_national_map_USGS(builtins.object) | The national map is a collection of topological datasets, maintained by the USGS. | | It provides an API endpoint which can be used to find downloadable links for the products offered. | - Full description of datasets available can retrieved. | This consists of metadata such as detail description and publication dates. | - A wide range of dataformats are available | | This class is a tiny wrapper to find and download files using the API. | | More complete documentation for the API can be found at | https://apps.nationalmap.gov/tnmaccess/#/ | | Methods defined here: | | __init__(self) | Initialize self. See help(type(self)) for accurate signature. | | download_tiles(self, region=None, out_dir=None, download_args={}, geopandas_args={}, API={}) -> None | Download the US National Elevation Datasets (NED) for a region. | | Args: | region (str | list, optional): An URL|filepath to a vector dataset Or a list of bounds in the form of [minx, miny, maxx, maxy]. | Alternatively you could use API parameters such as polygon or bbox. | out_dir (str, optional): The directory to download the files to. Defaults to None, which uses the current working directory. | download_args (dict, optional): A dictionary of arguments to pass to the download_file function. Defaults to {}. | geopandas_args (dict, optional): A dictionary of arguments to pass to the geopandas.read_file() function. | Used for reading a region URL|filepath. | API (dict, optional): A dictionary of arguments to pass to the self.find_details() function. | Exposes most of the documented API. Defaults to {}. | | Returns: | None | | find_details(self, bbox: List[float] = None, polygon: List[Tuple[float, float]] = None, datasets: str = None, prodFormats: str = None, prodExtents: str = None, q: str = None, dateType: str = None, start: str = None, end: str = None, offset: int = 0, max: int = None, outputFormat: str = 'JSON', polyType: str = None, polyCode: str = None, extentQuery: int = None) -> Dict | Possible search parameters (kwargs) support by API | | Parameter Values | Description | --------------------------------------------------------------------------------------------------- | bbox 'minx, miny, maxx, maxy' | Geographic longitude/latitude values expressed in decimal degrees in a comma-delimited list. | polygon '[x,y x,y x,y x,y x,y]' | Polygon, longitude/latitude values expressed in decimal degrees in a space-delimited list. | datasets See: Datasets (Optional) | Dataset tag name (sbDatasetTag) | From https://apps.nationalmap.gov/tnmaccess/#/product | prodFormats See: Product Formats (Optional) | Dataset-specific format | | prodExtents See: Product Extents (Optional) | Dataset-specific extent | q free text | Text input which can be used to filter by product titles and text descriptions. | dateType dateCreated | lastUpdated | Publication | Type of date to search by. | start 'YYYY-MM-DD' | Start date | end 'YYYY-MM-DD' | End date (required if start date is provided) | offset integer | Offset into paginated results - default=0 | max integer | Number of results returned | outputFormat JSON | CSV | pjson | Default=JSON | polyType state | huc2 | huc4 | huc8 | Well Known Polygon Type. Use this parameter to deliver data by state or HUC | (hydrologic unit codes defined by the Watershed Boundary Dataset/WBD) | polyCode state FIPS code or huc number | Well Known Polygon Code. This value needs to coordinate with the polyType parameter. | extentQuery integer | A Polygon code in the science base system, typically from an uploaded shapefile | | find_tiles(self, region=None, return_type='list', geopandas_args={}, API={}) | Find a list of downloadable files. | | Args: | region (str | list, optional): An URL|filepath to a vector dataset Or a list of bounds in the form of [minx, miny, maxx, maxy]. | Alternatively you could use API parameters such as polygon or bbox. | out_dir (str, optional): The directory to download the files to. Defaults to None, which uses the current working directory. | return_type (str): list | dict. Defaults to list. Changes the return output type and content. | geopandas_args (dict, optional): A dictionary of arguments to pass to the geopandas.read_file() function. | Used for reading a region URL|filepath. | API (dict, optional): A dictionary of arguments to pass to the self.find_details() function. | Exposes most of the documented API parameters. Defaults to {}. | | Returns: | list: A list of download_urls. | dict: A dictionary with urls and related metadata | | parse_region(self, region, geopandas_args={}) -> list | Translate a Vector dataset to its bounding box. | | Args: | region (str | list): an URL|filepath to a vector dataset to a polygon | geopandas_reader_args (dict, optional): A dictionary of arguments to pass to the geopandas.read_file() function. | Used for reading a region URL|filepath. | | ---------------------------------------------------------------------- | Readonly properties defined here: | | datasets | Returns a list of dataset tags (most common human readable self description for specific datasets). | | datasets_full | Full description of datasets provided. | Returns a JSON or empty list. | | prodFormats | Return all datatypes available in any of the collections. | Note that "All" is only peculiar to one dataset. | | ---------------------------------------------------------------------- | Data descriptors defined here: | | __dict__ | dictionary for instance variables (if defined) | | __weakref__ | list of weak references to the object (if defined)
Last update:
2023-03-04
Created: 2022-10-06
Created: 2022-10-06