Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to convert a number of large, floating point rasters into polygons so I can view overlaps etc. I've been using 3D Raster Domain sucessfully to do this. The only problem is that the polygons that are created are very large as a Polygon ZM is created, and I really only need a polygon. Any ideas how to do this? I've tried adding this to my script to disable Z and M values:

#disable M and Z values in output
arcpy.env.outputZflag = "Disabled"
arcpy.env.outputMflag = "Disabled"

... but it didn't reduce the size. I don't want to convert them to integer rasters (the original rasters are too numerous and large in size).

share|improve this question

I suspect the polygons are created as such large sizes, not because they are gaining the additional Z and M flags, but because they have millions of vertices! (Maybe some exaggeration there but.. perhaps you take my meaning.)

My recommendation would be to try downsampling the raster before you vectorize it. (By the way, never perform destructive edits on your original data!! Make a copy first!!)

Downsampling means if your raster grid corresponds to---for example---6 inches, you would translate it a larger cell-size, perhaps 1 sq. meter. Or maybe 1 acre. etc. etc. Fewer cells will mean fewer vertices, which will result in leaner polygon geometries. Just realize downsampling is costing you resolution. So you should be mindful to downsample into a reasonable resolution for whatever you're researching. If you're examining elk habitat, you don't need data in sq. inches. :) ...but if you're creating a cost-surface for pedestrian spaces, sq. feet or sq. yards might be reasonable.

If you're not interested in downsampling the raster first, you could always do the vectorization, then followup with a Simplify operation on your big polygons. This will take the polygons produced from the raster and reduce their densities, in effect accomplishing something similar---though I promise you the mapped areas will be different. The vectors from the downsampled raster will retain a "blocky" edge, while simplified polygons will probably look "jagged".

If I were you, I would downsample first, as I believe this would not only make the best use of your processor time, but also give you more desirable outputs.

share|improve this answer

Unless you made a typo, you aren't actually disabling the M and Z values. ESRI's use of capitalization is very frustrating as syntax errors aren't always returned (it isn't in this case) which makes debugging a pain.

A few weeks back I was working on this exact problem: creating an index shapefile of all the rasters in my directory. My shapefile was reduced from hundreds of megabytes to less than 5MB.

You code should be thus:

arcpy.env.outputMFlag = arcpy.env.outputZFlag = "Disabled"
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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