Problem: IRasterGeometryProc::ProjectFast does not generate square size raster


When projecting a raster using IRasterGeometryProc::ProjectFast, the cell size of the output raster is not square even though the signature allows a square cell size to be specified.


This is a known problem with ArcGIS 8.1.

Solution or Workaround

This problem has been addressed in ArcGIS Version 8.1.2.

In ArcGIS 8.1, do the following:

  1. Use IRasterProperty::SpatialReference to set the Spatial Reference to a Raster.
  2. Calculate the current raster's height and width, based on the current raster's extent and the cell size.
  3. Update the current raster's extent accordingly so that:

    n*Cell size = Extent in X dimension and
    m*Cell size = Extent in Y dimension.

  4. Set the current raster's extent and then set the raster's column and row.

    The sequence you follow does matter.