The raster using arcgis geoprocessing is cliped with a feature, reading it's geometry and as a result, rasters extent slightly differs. Extent of geom:

'570600,537958652 381252,627022596 570698,472917815 381474,211727455 NaN NaN NaN NaN'

Extent of raster (gp and gdal - both shows same):

'570600,424994 381252,499999738 570699,424994 381474,499999738 NaN NaN NaN NaN'

(570600.424994, 1.0, 0.0, 381474.49999973783, 0.0, -1.0)

Having a raster of 1x1 m. resolution that is minor thing... The problem comes as I produce multiple smaller rasters of the same area to compare and the ones smaller I extend with gdalwarp to the shapefile geometry (the one I clip with). I need rasters of the same extent to be able to compare them with numpy. As not the clipped raster has one column more then the extended one!

As I firstly produce smaller rasters, it is easier to get extent from the row geometry instead of test clipping.

Could enyone explain why clipped raster gets other extent then planned? And how to force gp.clip_management to take the geometry extension?

  • cant you create a buffer (ie empty column and row) around your raster to get the same image dimension you need? When you clip raster with vector, the extent can be different because a pixel cannot be divised this way. Jul 19, 2013 at 13:05
  • I understand the pixel division, but as u see, the the extent of raster did not get rounded to well, in order to guess which data is missing, as I get just ONE ROW missing. So , I can't just delete that row, not create new with no values because data is important..
    – najuste
    Jul 22, 2013 at 7:47
  • arcpy.env.extent = "XMin, YMin, XMax, YMax"?
    – Tomek
    Sep 18, 2013 at 15:25
  • @Tomek - With arcgis 9.3.. no arcpy available.
    – najuste
    Sep 19, 2013 at 8:23
  • webhelp.esri.com/arcgisdesktop/9.3/…?
    – Tomek
    Sep 19, 2013 at 8:34

1 Answer 1


Go into the environmental settings of the geo-processing tool and set SnapRaster to the extent you want.

  • Well, I'm trying to force raster to get the shp extent, not other raster extent. Snaping raster works just with rasters, which in any case means I will have to create firstly a raster to snap to.. Not a solution, but thanks.
    – najuste
    Jul 22, 2013 at 9:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.