Пропустить навигацию


AerialImagery AIforEarth USDA


This dataset contains aerial imagery from the National Agricultural Imagery Program (NAIP).

NAIP provides US-wide, high-resolution aerial imagery. This program is administered by the Aerial Field Photography Office (AFPO) within the US Department of Agriculture (USDA). This dataset is used for agricultural planning, as well as for a variety of applications in land use classification.

Storage resources

Data are stored in blobs (one blob per image) in the East US data center, in the following blob container:


Within that container, data are organized according to:


…for example:


More details on these fields:

  • Year: Four-digit year. Data is collected in each state every 3-5 years, with any given year containing some (but not all) states. For example, Alabama has data in 2011 and 2013, but not in 2012, while California has data in 2012, but not 2011 or 2013. Esri provides information about NAIP coverage in their interactive NAIP annual coverage map.
  • State: Two-letter state code.
  • Resolution: String specification of the resolution; “1m” in all the data currently available in this container, but subject to change.
  • Quadrangle: USGS quadrangle identifier, specifying a 7.5 minute x 7.5 minute area.

Files are stored as .mrf (Meta Raster Format) images (format spec), where each image is represented by three files: an .mrf metadata file in .xml format, a binary index (.idx) file, and a .lrc file containing the pixel data. These files were produced (from the original, USDA-provided GeoTIFF format) and organized by Esri. The .mrf format is both cloud-optimized and supported by GDAL.

We also provide a read-only SAS (shared access signature) token to allow access to NAIP data via, e.g., BlobFuse, which allows you to mount these containers as a drive:


Mounting instructions for Linux are here.


A list of all NAIP files is available here, as a zipped .txt file:


Older inventory files are available in naip-index container:



For questions about this dataset, contact aiforearthdatasets@microsoft.com.


Доступно вСценарии использования
Azure Notebooks

Quickly explore the dataset with Jupyter notebooks hosted on Azure or your local machine.

Предварительная версия

Выберите предпочитаемую службу:

Azure Notebooks

Azure Notebooks

Пакет: Язык: Python

Demo notebook for accessing NAIP data on Azure

This notebook provides an example of accessing NAIP data from blob storage on Azure, displaying an image using the rasterio library.

Imports and environment

In [1]:
import tempfile
import warnings
import urllib
import os
import rasterio
from rasterio.plot import show
import matplotlib.pyplot as plt
import numpy as np

%matplotlib inline

Choose and download an image

In [2]:
# Tiles are stored at:
# [blob root]/[year]/states/[state]/[state]_[resolution]_[year]/[quadrangle]/[filename]

blob_root = 'https://naipblobs.blob.core.windows.net/naip/data/v1'
year = '2011'
state = 'al'
resolution = '1m'
quadrangle = '30085'
filename = 'm_3008501_ne_16_1_20110815.mrf'
mrf_url = blob_root + '/' + year + '/states/' + state + '/' + state + '_' + resolution + '_' + year \
  + '/' + quadrangle + '/' + filename
temp_base = os.path.join(tempfile.gettempdir(),'naip')

mrf_filename = os.path.join(temp_base,next(tempfile._get_candidate_names())) + '.mrf'

# NAIP images consist of an mrf file (xml-formatted metadata), a binary index (.idx) file, and a .lrc 
# file containing the actual pixel data.  The .mrf and .idx files are very small; a typical .lrc file
# may be in the hundreds of MB.
source_urls = [mrf_url]
destination_filenames = [mrf_filename]


for iFile in range(0,3):
    source_url = source_urls[iFile]
    destination_filename = destination_filenames[iFile]
    print('Downloading file {} to {}'.format(source_url,destination_filename))
    urllib.request.urlretrieve(source_url, destination_filename)  
    nBytes = os.path.getsize(destination_filename)
    print('...done, downloaded {} bytes.'.format(nBytes))
Downloading file https://naipblobs.blob.core.windows.net/naip/data/v1/2011/states/al/al_1m_2011/30085/m_3008501_ne_16_1_20110815.mrf to C:\Users\dan\AppData\Local\Temp\naip\amokqhxg.mrf
...done, downloaded 1214 bytes.
Downloading file https://naipblobs.blob.core.windows.net/naip/data/v1/2011/states/al/al_1m_2011/30085/m_3008501_ne_16_1_20110815.idx to C:\Users\dan\AppData\Local\Temp\naip\amokqhxg.idx
...done, downloaded 17408 bytes.
Downloading file https://naipblobs.blob.core.windows.net/naip/data/v1/2011/states/al/al_1m_2011/30085/m_3008501_ne_16_1_20110815.lrc to C:\Users\dan\AppData\Local\Temp\naip\amokqhxg.lrc
...done, downloaded 230994615 bytes.

Open and plot the image

In [3]:
raster = rasterio.open(mrf_filename)

# NAIP imagery has four channels: R, G, B, IR
# Stack RGB channels into an image; we won't try to render the IR channel
# rasterio uses 1-based indexing for channels.
r = raster.read(1); g = raster.read(2); b = raster.read(3)
rgb = np.dstack((r,g,b))
fig=plt.figure(figsize=(7.5, 7.5), dpi=100, edgecolor='k')