Raster to polygon,output polygons are larger than input raster

5916
18
05-19-2015 12:42 PM
DitlevReventlow
Occasional Contributor II

Hey everyone.

I am using a raster layer (raster1) to clip another raster layer (raster2). As far as I understand I need to use the raster to polygon tool on raster 1 to be able to do this as you cannot clip a raster with another raster. If this is wrongly interpreted, please let me know.

My problem is that the polygon output is bigger the the raster input. The polygons are filling out many of the gabs between the raster pixel, resulting in a polygon that is much larger than the input raster. How can I make it "finer" so that It only draws polygons where there is actually a relevant pixel?

Thank you very much.

Best regards

Ditlev Reventlow.

Tags (1)
0 Kudos
18 Replies
DitlevReventlow
Occasional Contributor II

Sorry Dan, I am doing the clipping operation with raster 1 (land use change map) not raster 2 (Evapotranspiration change map).

0 Kudos
DanPatterson_Retired
MVP Emeritus

It is hard to tell without the visuals.  Alternately, you need to provide information on the extent of the two files.  I suspect you are relying on what you see.  Assume that the raster that you want to clip has the bounds

0-100 W and 0-100 H, then the raster that is doing the clipping needs to have an extent smaller than this range and within the range of the actual extent.  It is 'cookie-cutting'... the cookie cutter has to be smaller than the dough

DitlevReventlow
Occasional Contributor II

Hey Dan.

I have tried to explain the problem visually in step in this attachment. This is for the extract by mask tool.

0 Kudos
DitlevReventlow
Occasional Contributor II

Sorry, Attachment didn't work apparently.

0 Kudos
DanPatterson_Retired
MVP Emeritus

The difference is the coordinate system is indeed the problem.  You should work with projected data and when combining or working with different datasets, they need to be in the same coordinate system. Projection-on-the-fly and hoping that a conversion will occur is not the way to go.  Get the data ready upfront so that everything is on the same playing field, and it will save you a whole load of time.

DitlevReventlow
Occasional Contributor II

Great thanks, hope fully It will work for the next analysis with maps of same coordinate system.

0 Kudos
DitlevReventlow
Occasional Contributor II

I tried to do it for two layers with the same coordinate system and the problem was still there. Saying the problem, I mean that the programme fill out gabs that doesn't have a value. So apparently the coordinate system was not the problem.

I have attached a new description of what I have done.

Thank you very much for your help.

0 Kudos
DanPatterson_Retired
MVP Emeritus

I can't tell what the 'extents' are they both look the same.  The extents use the left, right, bottom and top of the smaller image in extract by mask, so it could indeed be correct.  Are you wanting just to return values for where raster 2 has values?  If so, then you have to set the analysis extent to that of raster2 AS WELL as use the Con statement

0 Kudos
DitlevReventlow
Occasional Contributor II

The extent are shown in the attached document.

Yes exactly, I only want the value from the cells where raster 2 has values. How do I use Con statement in Extract by mask?

0 Kudos