2

I have a geostatistical layer created using ordinary kriging and the Create Geostatistical Layer tool in Model Builder. I am trying to output this layer to a raster that matches a target raster using the GA Layer to Grid tool. I have used the target raster to set the Snap Raster, Cell Size, and Processing Extent environment variables and various logical combinations of these variables. However, the raster that is output has one additional row at the top when compared to the target raster. This row is filled with NoData values.

Differences are highlighted in bold italics

The target raster has these dimensions:

Columns_and_Rows: 110, 166
Cell_Size: 0.11559105, 0.11559105
Extent:

Top 49.359975678
Left -129.652945807
Right -116.937930333
Bottom 30.1718614184

Spatial_Reference: CS_WGS_1984

The output raster has these:

Columns_and_Rows: 110, 167
Cell_Size: 0.11559105, 0.11559105
Extent:

Top 49.4755667278
Left -129.652945807
Right -116.937930333
Bottom 30.1718614184

Spatial_Reference: CS_WGS_1984

Why does my raster have an extra row (and therefore the wrong Extent) and how can I fix this?

  • If environment is set as you said try simple map calculator on output, e.g. output*1 – FelixIP Oct 11 '16 at 18:33
  • @FelixIP, is the idea behind your suggestion to use the Raster Calculator to drop the NoData row? In that case, a raster clip operation can work as well. I prefer not to have an extra step in the model if possible. I should be able to output a raster that matches my template, so ideally someone can help me figure that out. Thanks for the suggestion! – Cotton.Rockwood Oct 11 '16 at 18:40
  • Clip, yeah right. Good luck in finding the reason, I hit this wall multiple times – FelixIP Oct 11 '16 at 19:02
  • @FelixIP I was actually able to resolve this by setting all relevant environment variables and tool parameters at once. See my answer below. – Cotton.Rockwood Oct 12 '16 at 4:29
  • It means they were not set up as your stated on your post – FelixIP Oct 12 '16 at 4:34
1

I was able to resolve my problem by setting additional variables both for the environment and the tool. Specifically, I added the target raster as an element in the model. I then used the Connect tool to link it to the GA Layer to Grid model object and set: 1) Snap Raster environment variable, 2) Extent environment variable, 3) Cell Size tool parameter and 4) Cell Size environment variable. I don't know if the order has any effect (it shouldn't), but this process gave me output rasters with the proper resolution and extent matching the target raster.

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.