ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Download Rasters

  • Summary
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

Summary

Downloads the source files from an image service or mosaic dataset.

Usage

  • The raster datasets you download are the source files, unless you convert them to another format. Format conversion can be forced, or will only occur when required. Downloaded files are converted if clipping occurs or the source file cannot be downloaded as a raster.

  • You can download selected rasters or LAS files from an image service or a mosaic dataset to a specified folder in the original file format.

  • If a clipping extent is specified, the rasters that intersect the clip extent will be clipped and then converted to a specified format.

  • You can choose to download the data in the same folder structure as the source.

Syntax

DownloadRasters(in_image_service, out_folder, {where_clause}, {selection_feature}, {clipping}, {convert_rasters}, {format}, {compression_method}, {compression_quality}, {MAINTAIN_FOLDER})
ParameterExplanationData Type
in_image_service

The image service or mosaic dataset to download.

Image Service; Mosaic Layer; Raster Layer; String
out_folder

The destination for the image service or mosaic dataset.

Folder
where_clause
(Optional)

An SQL expression to limit the download to raster datasets that satisfy the expression.

SQL Expression
selection_feature
(Optional)

Limits the download to an extent of a feature class or bounding box. All raster datasets that intersect the extent will be downloaded.

Extent
clipping
(Optional)

Specify if you want to clip the downloaded images based on the geometry of a feature. Any raster that intersects the clipping geometry will be clipped and then downloaded. This is useful when your area of interest is not a rectangle. When downloaded images are clipped, you need to specify an output format for the clipped images.

  • NO_CLIPPING —The files will be clipped based on the minimum bounding rectangle that has been specified. This is the default.
  • CLIPPING —The files will be clipped based on the geometry of the selection_feature.
Boolean
convert_rasters
(Optional)

Choose whether to always convert your rasters to the specified format, or to only convert when it is necessary.

  • CONVERT_AS_REQUIRED —Do not convert the raster datasets to a new format.
  • ALWAYS_CONVERT —Convert the downloaded raster datasets into another format. If you used selection_feature to limit the extent, then you need to specify a format in the format parameter.
Boolean
format
(Optional)

Choose a output format for the downloaded raster datasets.

  • TIFF —Tagged Image File Format. This is the default.
  • BIL —Esri band interleaved by line.
  • BSQ —Esri band sequential.
  • BIP —Esri band interleaved by pixel.
  • BMP —Bitmap.
  • ENVI —ENVI DAT file.
  • IMAGINE Image —ERDAS IMAGINE.
  • JPEG —Joint Photographics Experts Group. If chosen, you can also specify the compression quality. The valid compression quality value ranges are from 0 to 100.
  • GIF —Graphic interchange format.
  • JP2 —JPEG 2000. If chosen, you can also specify the compression quality. The valid compression quality value ranges are from 0 to 100.
  • PNG —Portable Network Graphics.
String
compression_method
(Optional)

Choose the compression method to use with the specified Output Format.

  • NONE —No compression will occur. This is the default.
  • JPEG —Lossy compression that uses the public JPEG compression algorithm. If you choose JPEG, you can also specify the compression quality. The valid compression quality value ranges are from 0 to 100. This compression can be used for JPEG files and TIFF files.
  • LZW —Lossless compression that preserves all raster cell values.
  • PACKBITS —PackBits compression for TIFF files.
  • RLE —Run-length encoding for IMG files.
  • CCITT_GROUP3 —Lossless compression for 1-bit data.
  • CCITT_GROUP4 —Lossless compression for 1-bit data.
  • CCITT_1D —Lossless compression for 1-bit data.
String
compression_quality
(Optional)

Set a value from 1 - 100. Higher values will have better image quality, but less compression.

Long
MAINTAIN_FOLDER
(Optional)

Determines the folder structure of the downloaded rasters.

  • MAINTAIN_FOLDER —Replicate the hierarchical folder structure used to store the source raster datasets.
  • NO_MAINTAIN_FOLDER —Raster datasets will be downloaded into the out_folder as a flat folder structure.
Boolean

Derived Output

NameExplanationData Type
derived_out_folder

The updated output folder.

Folder

Code sample

DownloadRasters example 1 (Python window)

This is a Python sample for the DownloadRasters tool.

import arcpy
DownloadRasters_management(
     "http://srv/arcgis/services/Ext/MDpan/ImageServer?", "c:/dload/", 
     "AcquisitionDate = date '1999-08-18'", "", 
     "c:/workspace/clippingfeat.shp", "TIFF", "JPEG", "75", 
     "MAINTAIN_FOLDER", "CONVERT_AS_REQUIRED")
DownloadRasters example 2 (stand-alone script)

This is a Python script sample for the DownloadRasters tool.

##Download Rasters from image services URL
##Maintain the original sensor data folder structure

import arcpy
arcpy.env.workspace = r"\\myworkstation\Workspace\downloadras"
    
arcpy.DownloadRasters_management(
     "http://serv1/arcgis/services/Ext/MD_LS_pan/ImageServer?",
     "downloadFolder", "AcquisitionDate = date '1999-08-18 00:00:00'",
     "", "", "", "", "", "MAINTAIN_FOLDER")

Environments

  • Extent

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes

Related topics

  • An overview of the Raster toolset
  • Environment settings for raster data
  • Downloading data from an image service

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2020 Esri. | Privacy | Legal