NAIP#
- class torchgeo.datasets.NAIP(paths='data', crs=None, res=None, bands=None, transforms=None, cache=True, time_series=False)[source]#
Bases:
RasterDatasetNational Agriculture Imagery Program (NAIP) dataset.
The National Agriculture Imagery Program (NAIP) acquires aerial imagery during the agricultural growing seasons in the continental U.S. A primary goal of the NAIP program is to make digital ortho photography available to governmental agencies and the public within a year of acquisition.
NAIP is administered by the USDA’s Farm Service Agency (FSA) through the Aerial Photography Field Office in Salt Lake City. This “leaf-on” imagery is used as a base layer for GIS programs in FSA’s County Service Centers, and is used to maintain the Common Land Unit (CLU) boundaries.
If you use this dataset in your research, please cite it using the following format:
- filename_glob = 'm_*.*'#
Glob expression used to search for files.
This expression should be specific enough that it will not pick up files from other datasets. It should not include a file extension, as the dataset may be in a different file format than what it was originally downloaded as.
- filename_regex = '\n ^m\n _(?P<quadrangle>\\d+)\n _(?P<quarter_quad>[a-z]+)\n _(?P<utm_zone>\\d+)\n _(?P<resolution>\\d+)\n _(?P<date>\\d+)\n (?:_(?P<processing_date>\\d+))?\n \\..*$\n '#
Regular expression used to extract date from filename.
The expression should use named groups. The expression may contain any number of groups. The following groups are specifically searched for by the base class:
date: used to calculatemintandmaxtforindexinsertionstart: used to calculatemintforindexinsertionstop: used to calculatemaxtforindexinsertion
When
separate_filesis True, the following additional groups are searched for to find other files:band: replaced with requested band name
- plot(sample, show_titles=True, suptitle=None)[source]#
Plot a sample from the dataset.
- Parameters:
- Returns:
a matplotlib Figure with the rendered sample
- Return type:
Changed in version 0.3: Method now takes a sample dict, not a Tensor. Additionally, possible to show subplot titles and/or use a custom suptitle.