0

I want to project a bunch of rasters (WGS84) to different UTM (WGS84) coordinate systems. The coordinate system depends on a field value of a point shape.

So on each raster lays a point with its spatial reference.

I scripted a little ModelBuilder toolchain for it but unfortunately the Project raster Tool stays white and doesn't execute.

enter image description here

Some detail information for the toolchain:

I extract the information wich point lays on the individual raster with the sample tool. Then I get for each raster a table with many no data points and one with the stored EPSG Information. This point is extracted by the table select tool and then I get the EPSG with the get field value tool and store it as spatial reference.

The spatial reference I use as Output coordinate system. But the Project raster tool requires the "optional" Geographic Transformation although both coordinate systems use the WGS84 referece.

enter image description here Tool Dialog of Create spatial reference

  • I tested the toolchain until the projection part and there is no error.
  • I've checked if the rasters lay in the UTM zone I want to project them to.
  • When I run the tool first, then disconnect the spatial reference and the Projection and then reconnect, the tool gets colorful. But when I run the toolchain again (without validation) only one Raster is projected several times to the same coordinate system until I cancel it.
  • at no point any error message occurs when running the tool
  • I've changed the data type of the field value to "Coordinate System" with no effect
  • What does the tool dialog of Project Raster currently look like? I suspect it will be missing at least one parameter value. – PolyGeo Apr 23 '18 at 10:34
  • @PolyGeo I've added a screenshot. The message box says "Undefined geographic transformation." – David Apr 23 '18 at 10:41
  • It says it's optional, but it seems to be complaining that its not present, so as a test try using any value from the pulldown. – PolyGeo Apr 23 '18 at 10:43
  • @PolyGeo When I choose any value the tool turns colorful. But I can't find a WGS84 to WGS84 transformation. – David Apr 23 '18 at 10:51
  • You won't find a transformation from one datum to the same datum. What coordinate system is defined for your raster, and by your Create Spatial Reference tool? Are you sure that you need Create Spatial Reference rather than Define Projection? – PolyGeo Apr 23 '18 at 11:16
0

It seems like an Error of the Project Raster tool itself. When I use the ArcPy script of the Esri page and change it a bit to insert the parameters and load this script tool to my model it works perfectly. No error message and no white tool.

import arcpy
from arcpy import env

Input_Raster = arcpy.GetParameterAsText(0)
Output_Raster = arcpy.GetParameterAsText(1)
Output_Coord = arcpy.GetParameterAsText(2)

arcpy.ProjectRaster_management(Input_Raster, Output_Raster,Output_Coord, "BILINEAR")

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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