0

I have a few thousand ortho mosaic tiles that I've resampled to a lower GSD and am trying to cut into larger tiles. I developed a script that has worked perfectly for thousands and thousands of tiles over the course of many projects.

I am having a problem now where at the upper right corner of my current project area the tiles are not cutting into the proper image extent, but only for two of the five tiles I'm attempting to cut.

I'm using ArcGIS 10.2 for the clipping process. The script utilizes arcpy.Clip_management. The images are TIFFs. I've played with dozens of environment settings, including processing extent, and I get the same thing every time. The input data has RGB values of 0,0,0 outside of the bad extent it is clipping to. The script itself clips to a shapefile defining the area of interest, but has always matched the input extent regardless of whether or not there was actually image there.

The process clips to these bounds: Bad extent

When I need it to clip to these bounds (and yes, I need/want all of those black pixels so image size will match all other tiles): Good extent

1
  • have you tried copyRaster (with a given extent) instead of clip?
    – radouxju
    Commented May 14, 2014 at 17:57

1 Answer 1

0

I guess it's a minimum bounding geometry problem. The polygon I'm cutting to ended in this corner, so that was the fullest extent of the project no matter how much I tried to tell it that it wasn't.

So I drew a little toucan-shaped polygon to the northeast of the project and extended the bounding geometry, like so:

enter image description here

Silly solution to a silly problem.

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.