com.esri.arcgis.geoprocessing.tools.datamanagementtools
Class ProjectRaster
java.lang.Object
com.esri.arcgis.geoprocessing.AbstractGPTool
com.esri.arcgis.geoprocessing.tools.datamanagementtools.ProjectRaster
- All Implemented Interfaces:
- GPTool
public class ProjectRaster
- extends AbstractGPTool
Transforms the raster dataset from one projection to another.
The Project Raster tool is contained in the Data Management Tools tool box.
Learn more about how Project Raster works
Software restrictions: none
Usage tips:
- The coordinate system defines how your raster data is projected.
- This tool guarantees that the error is less than half a pixel.
- You are able to choose a preexisting spatial reference, import it from another dataset, or create a new one.
- You may want to change the coordinate system so your data is all in the same projection.
- You can save your output to BMP, GIF, GRID, IMG, JPEG, JPEG 2000, PNG, TIFF, or any geodatabase raster dataset.
- When storing a raster dataset in a geodatabase, no file extension should be added to the name of the raster dataset. When storing the raster dataset in a file format, you need to specify the file extension: .bmp for BMP, .gif for GIF, .img for an ERDAS IMAGINE file, .jpg for JPEG, .jp2 for JPEG 2000, .png for PNG, .tif for TIFF, or no extension for GRID.
- When storing your raster dataset to a geodatabase, you can specify a compression type and compression quality within the Raster Storage Settings in the Environment Settings dialog box.
- Projects a raster dataset into a new spatial reference using a bilinear interpolation approximation method, which projects pixels on a coarse mesh grid and uses bilinear interpolation in between the pixels.
- The NEAREST option, which performs a nearest neighbor assignment, is the fastest of the four interpolation methods. It is primarily used for categorical data, such as a land use classification, because it will not change the cell values. Do not use NEAREST for continuous data, such as elevation surfaces.
- The BILINEAR option, bilinear interpolation, determines the new value of a cell based on a weighted distance average of surrounding cells. The CUBIC option, cubic convolution, determines the new cell value by fitting a smooth curve through the surrounding points. These are most appropriate for continuous data and may cause some smoothing; also, cubic convolution may result in the output raster containing values outside the range of the input raster. It is not recommended that BILINEAR or CUBIC be used with categorical data because the cell values may be altered.
- The cells of the raster dataset will be square and of equal area in map coordinate space, although the shape and area a cell represents on the surface of the earth will never be constant across a raster. This is because no map projection can preserve both shape and area simultaneously. The area represented by the cells will vary across the raster. Therefore, the cell size and the number of rows and columns in the output raster may change.
- Always specify an output cell size, unless you are projecting between spherical (latitude/longitude) coordinates and a planar coordinate system where you don't know what an appropriate cell size would be.
- The default cell size of the output raster is determined from the projected cell size at the center of the output raster. This is usually also the intersection of the central meridian and latitude of true scale and is the area of least distortion. The boundary of the input raster is projected, and the minimum and maximum extents dictate the size of the output raster. Each cell is projected back to the input coordinate system to determine the cell's value.
- The geographic transformation is an optional parameter when the input and output coordinate systems have the same datum. If the input and output datum are different, a geographic transformation needs to be specified.
- When you are using the tool's command in the command line window, you may need to press F8 when entering a variable with which you need help. You may want to do this when entering a spatial reference.
- CLARKE 1866 is the default spheroid if it is not inherent to the projection (such as NEWZEALAND_GRID) or another is specified with the SPHEROID subcommand.
- The following environments affect this tool: current workspace; scratch workspace; output extent; snap raster; output CONFIG keyword; pyramid; raster statistics; compression; , and tile size;
- The snap raster setting will take priority over the registration point, if both are set.
ProjectRaster
public ProjectRaster()
- Creates the Project Raster tool with defaults.
Initializes the array of tool parameters with the default values specified when the tool was created.
ProjectRaster
public ProjectRaster(Object inRaster,
Object outRaster,
Object outCoorSystem)
- Creates the Project Raster tool with the required parameters.
Initializes the array of tool parameters with the values as specified for the required parameters and with the default values for the other parameters.
- Parameters:
inRaster - Composite Geodataset, the input raster dataset.outRaster - Raster Dataset, when storing a raster dataset in a geodatabase, no file extension should be added to the name of the raster dataset. A raster dataset stored in a geodatabase can be compressed; you can specify a compression type and compression quality.outCoorSystem - Spatial Reference, to add this variable, press F8 or right-click and click Insert Variable.
getInRaster
public Object getInRaster()
- Returns the Input Raster parameter of this tool .
This parameter is Composite Geodataset, the input raster dataset.
This is a required parameter.
- Returns:
- the Input Raster
setInRaster
public void setInRaster(Object inRaster)
- Sets the Input Raster parameter of this tool .
This parameter is Composite Geodataset, the input raster dataset.
This is a required parameter.
- Parameters:
inRaster - Composite Geodataset, the input raster dataset.
getOutRaster
public Object getOutRaster()
- Returns the Output Raster Dataset parameter of this tool .
This parameter is Raster Dataset, when storing a raster dataset in a geodatabase, no file extension should be added to the name of the raster dataset. A raster dataset stored in a geodatabase can be compressed; you can specify a compression type and compression quality.
This is a required parameter.
- Returns:
- the Output Raster Dataset
setOutRaster
public void setOutRaster(Object outRaster)
- Sets the Output Raster Dataset parameter of this tool .
This parameter is Raster Dataset, when storing a raster dataset in a geodatabase, no file extension should be added to the name of the raster dataset. A raster dataset stored in a geodatabase can be compressed; you can specify a compression type and compression quality.
This is a required parameter.
- Parameters:
outRaster - Raster Dataset, when storing a raster dataset in a geodatabase, no file extension should be added to the name of the raster dataset. A raster dataset stored in a geodatabase can be compressed; you can specify a compression type and compression quality.
getOutCoorSystem
public Object getOutCoorSystem()
- Returns the Output Coordinate System parameter of this tool .
This parameter is Spatial Reference, to add this variable, press F8 or right-click and click Insert Variable.
This is a required parameter.
- Returns:
- the Output Coordinate System
setOutCoorSystem
public void setOutCoorSystem(Object outCoorSystem)
- Sets the Output Coordinate System parameter of this tool .
This parameter is Spatial Reference, to add this variable, press F8 or right-click and click Insert Variable.
This is a required parameter.
- Parameters:
outCoorSystem - Spatial Reference, to add this variable, press F8 or right-click and click Insert Variable.
getResamplingType
public String getResamplingType()
- Returns the Resampling Techinque parameter of this tool .
This parameter is String, the NEAREST and MAJORITY options are used for categorical data, such as a landuse classification. The NEAREST option is the default since it is the quickest and also because it will not change the cell values. Do not use NEAREST or MAJORITY for continuous data, such as elevation surfaces.
The BILINEAR option and the CUBIC option are most appropriate for continuous data. It is not recommended that BILINEAR or CUBIC be used with categorical data because the cell values may be altered.
This is an optional parameter.
- Returns:
- the Resampling Techinque
setResamplingType
public void setResamplingType(String resamplingType)
- Sets the Resampling Techinque parameter of this tool .
This parameter is String, the NEAREST and MAJORITY options are used for categorical data, such as a landuse classification. The NEAREST option is the default since it is the quickest and also because it will not change the cell values. Do not use NEAREST or MAJORITY for continuous data, such as elevation surfaces.
The BILINEAR option and the CUBIC option are most appropriate for continuous data. It is not recommended that BILINEAR or CUBIC be used with categorical data because the cell values may be altered.
This is an optional parameter.
- Parameters:
resamplingType - String, the NEAREST and MAJORITY options are used for categorical data, such as a landuse classification. The NEAREST option is the default since it is the quickest and also because it will not change the cell values. Do not use NEAREST or MAJORITY for continuous data, such as elevation surfaces.
The BILINEAR option and the CUBIC option are most appropriate for continuous data. It is not recommended that BILINEAR or CUBIC be used with categorical data because the cell values may be altered.
getCellSize
public Object getCellSize()
- Returns the Output Cell Size parameter of this tool .
This parameter is Analysis Cell Size, the cell size for the output raster dataset. The default cell size is the cell size of the selected raster dataset.
This is an optional parameter.
- Returns:
- the Output Cell Size
setCellSize
public void setCellSize(Object cellSize)
- Sets the Output Cell Size parameter of this tool .
This parameter is Analysis Cell Size, the cell size for the output raster dataset. The default cell size is the cell size of the selected raster dataset.
This is an optional parameter.
- Parameters:
cellSize - Analysis Cell Size, the cell size for the output raster dataset. The default cell size is the cell size of the selected raster dataset.
getGeographicTransform
public Object getGeographicTransform()
- Returns the Geographic Transformation parameter of this tool .
This parameter is String, for information on each supported geographic (datum) transformations, see the
geographic_transformations.pdf
located in \ArcGIS\Documentation.
This is an optional parameter.
- Returns:
- the Geographic Transformation
setGeographicTransform
public void setGeographicTransform(Object geographicTransform)
- Sets the Geographic Transformation parameter of this tool .
This parameter is String, for information on each supported geographic (datum) transformations, see the
geographic_transformations.pdf
located in \ArcGIS\Documentation.
This is an optional parameter.
- Parameters:
geographicTransform - String, for information on each supported geographic (datum) transformations, see the
geographic_transformations.pdf
located in \ArcGIS\Documentation.
getRegistrationPoint
public Object getRegistrationPoint()
- Returns the Registration Point parameter of this tool .
This parameter is Point, the x and y coordinates (in the output space) used for pixel alignment.
This is an optional parameter.
- Returns:
- the Registration Point
setRegistrationPoint
public void setRegistrationPoint(Object registrationPoint)
- Sets the Registration Point parameter of this tool .
This parameter is Point, the x and y coordinates (in the output space) used for pixel alignment.
This is an optional parameter.
- Parameters:
registrationPoint - Point, the x and y coordinates (in the output space) used for pixel alignment.
getInCoorSystem
public Object getInCoorSystem()
- Returns the Input Coordinate System parameter of this tool .
This parameter is Coordinate System, the coordinate system of the input raster dataset.
This is an optional parameter.
- Returns:
- the Input Coordinate System
setInCoorSystem
public void setInCoorSystem(Object inCoorSystem)
- Sets the Input Coordinate System parameter of this tool .
This parameter is Coordinate System, the coordinate system of the input raster dataset.
This is an optional parameter.
- Parameters:
inCoorSystem - Coordinate System, the coordinate system of the input raster dataset.
getToolName
public String getToolName()
- Returns the name of this tool.
- Returns:
- the tool name
getToolboxName
public String getToolboxName()
- Returns the name of the tool box containing this tool.
- Returns:
- the tool box name
getToolboxAlias
public String getToolboxAlias()
- Returns the alias of the tool box containing this tool.
- Returns:
- the tool box alias