Extract by mask, problem with column and rows

4478
6
03-28-2013 06:48 AM
JelleHazenbosch
New Contributor
Reader,
We are working on a landuse map from the Netherlands (LGN6) which we extract by mask bassed on several polygons. However the colomns and rows in the new (masked) maps, which are only a small part of the original LGN6 data, addapt the original size in colomns and rows. Even when zooming to layer it shows the area of the full (original) map and not just the masked area.

We used this method on other map data (soil and LGN5) which don't show this problem.
This is a big problem because we can not analyse our LGN6 data in FRAGSTATS.

Any idea on what to look at?

regards,
Jelle H.

(LGN6&soil map: Alterra, 2007/2007 & Alterra 2000)
0 Kudos
6 Replies
BrianCohen
New Contributor III
Have you checked the Processing Extent under the Environments tab? If it is set to the LGN6, your current results make sense. If you leave it at Default, or change it to the extent of the Mask polygon file, you should get the results you want.
0 Kudos
JelleHazenbosch
New Contributor
Thank you for your reply!
I've looked at it but it isn't checked. Not the 'Extent' nor 'snap raster' options.

We havn't changed any other settings than switchin maps so there has to be something different with the map i suppose...?
0 Kudos
curtvprice
MVP Esteemed Contributor
I've looked at it but it isn't checked. Not the 'Extent' nor 'snap raster' options.


Jelle,

The default extent settings for most tools is MAXOF. So your large output is what I'd expect if the extent has not been set.

If you set the extent to the smaller area, your output raster will be the smaller area. Set the snap raster to your land use raster if you want the output raster cells to "line up" with the input land use raster (no shifting or resampling).

Another option to try is the Clip_management tool. Clip has the side benefit of being dramatically faster than Extract By Mask.
0 Kudos
JelleHazenbosch
New Contributor
I have tried several options of processing extent now but none have the desired effect.

To clarify; the method (so without Processing Extent checked) works perfectly on LGN5. Each masked patch of land gets its own specific amount of rows and columns.

We looked at the Clip tool but we found that that tool caused overlap in de data. In case the mask doesn't work out; could the overlap of data by using clip be avoided by setting the snap raster to LGN6?
0 Kudos
JeffreySwain
Esri Regular Contributor
So Extract by Mask will not change the rows and columns and the Clip tool adds overlap data?  Is that a correct explanation?  What kind of polygon are you using?  What is the cell size of the original raster and the clipped raster? Is this LGN6 data corrupt?  Are the cells rectangular by a little bit?  It sounds as if the original is rectangular and then in the clipping process each tool tries to account for this.  The Extract by Mask seems to make them square.  The other question is when you zoom to the extent of the clipping polygon does it zoom in or does it zoom to the full extent?  I think the that snap raster and the processing extent should help, but I am more interested in the original data. For the true comparison as well, I would convert the clipping polygon to a raster to see what the clipping area would be.  Perhaps that will also yield a clue as to what is happening.
0 Kudos
JelleHazenbosch
New Contributor
So,

we solved the problem by setting the processing extent to the shapefile.

However,
we want to iterate 317 shapefiles from a file geodatabase within a model.
In this model, we can't get the processing extent option to match the iterating files.

Does anyone have a suggestion how to do this?
So we need the processing extend in the 'extract by mask' tool  to match the iterating files from the file gdb
to prevent us from having to do all the 317 files by hand.

See the attachment for a visual (and better) explanation of the problem and the display of our model.
0 Kudos