How to copy raster extent/shift raster to extent

651
3
Jump to solution
06-05-2020 09:15 AM
MoritzWollenhaupt
New Contributor

Hi,

Is it possible to "copy-paste" the geospatial extent from one .tif file to an other? I would like to shift an non-georeferenced image to the same position as an georeferenced image in ArcGIS Pro 2.5 (via python).

The manipulation of

arcpy.env.extent=georeferenced_image.extent

results in a georeferenced image, but in this image only "noDataValues" are present.

Are there any solutions/proposals how an image can be reprojected/shifted onto another?

0 Kudos
1 Solution

Accepted Solutions
DanPatterson
MVP Esteemed Contributor

Shift is the word and the tool

Shift—Data Management toolbox | Documentation 


... sort of retired...

View solution in original post

3 Replies
DanPatterson
MVP Esteemed Contributor

Shift is the word and the tool

Shift—Data Management toolbox | Documentation 


... sort of retired...
MoritzWollen
New Contributor II

Thanks for the answer - Just the tool I was looking for. The lower left corner of my grid is now in the right position - But the CellSize is not taken over, so my moved grid is too big.
"in_snap_raster" is set to the original grid - Did I miss anything here?

Edit:

Documentation says

"The cell size of the output raster will be the same as that of the input raster."

My InputRaster's cell size is ~0.48

My OutputRaster's cell size is 1.

0 Kudos
MoritzWollen
New Contributor II

I have found that scaling the CellSize afterwards using arcpy.Rescale_management scales the CellSize to the desired size - but this is an additional, cumbersome step?

0 Kudos