1

I've got a feature layer of certain fields (which I converted to raster), and a raster layer of different vegetation types. I now want to compute the area of each vegetation type for each field. For this I used the tabulate areas tool which did not give me any errors, but I lost some ID's. Now I read that this seems to be a general problem with big datasets.

Still I would like to ask if someone has a solution/ workaround for this that will give me the same result in the end. I'm new to python programming and have not been able to find a solution myself.

I furthermore have some entries in my resulting tables that simply do not make sense when looking at the original data. I'm worried now that the values for all entries are wrong and I cannot use them at all.

This is what my code looks like:

 inZoneData = "Field_Rast"
 zoneField = "Value" 
 inClassData = "vegtypes.tif"
 classField = "Value"
 outTable = "C:/data/areatable.dbf"
 processingCellSize = arcpy.env.cellSize = "vegtypes.tif" 

 TabulateArea(inZoneData, zoneField, inClassData, classField, outTable, processingCellSize)

This is a small part of the table I get where you can see that the object ID and the value do not match and in fact I have fewer OIDs than I did original values.

Example of table with missing IDs

Edit: The datasets are originally not in the same coordinate system, but I transformed them before taking this step

sdots
  • 85
  • 6
  • You could also try to convert your vegetation types raster into vector polygons (http://resources.arcgis.com/en/help/main/10.1/index.html#//001200000008000000) and then union the two vector inputs (http://resources.arcgis.com/en/help/main/10.1/index.html#//001200000008000000). You could then perform summary statistics (http://resources.arcgis.com/en/help/main/10.1/index.html#//00080000001z000000) on the union result to sum the areas by vegetation type. – Brent Edwards Sep 22 '15 at 15:07
  • The disparity in your values could be down to your rasters having different coordinate systems and cell sizes? Please edit your question to include this information. – Hornbydd Sep 22 '15 at 21:24
  • I tried out your proposal @BrentEdwards, assuming you meant the Union tool in the Analysis toolbox (link points to raster to polygon conversion). Seemed to have worked at first, but the resulting feature class cannot be opened in ArcGIS, nor can it be used for further processing. Kind of confused right now. – sdots Sep 24 '15 at 12:42
  • Just saw that it is actually missing the shapefile - anybody know why? – sdots Sep 24 '15 at 13:05
  • Yeah, sorry for the bad link. It is in fact the Union tool in the Analysis toolbox - http://resources.arcgis.com/en/help/main/10.1/index.html#//00080000000s000000. What format are your Union inputs and output (ex. shapefile, file gdb feature classes)? What message is ArcMap displaying when you try to open the output? Do your inputs overlap? – Brent Edwards Sep 24 '15 at 17:35
  • Your statement "The datasets are originally not in the same coordinate system, but I transformed them before taking this step" makes me wonder what process you used to "transform" them. I would have expected that you would need to use the Project tool (and to have kept away from Define Projection in this instance) but without more detail it is hard to tell. – PolyGeo Sep 25 '15 at 02:49
  • @BrentEdwards my inputs are both shapefiles, my output is supposed to be a shapefile to, but I only get the sbn, sbx and xml file - not the shapefile itself. As a result I can't even try to open the output, since it is not even displayed in ArcMap, or ArcCatalog. And yes my inputs overlap, since the idea is to figure out the area of each vegetation type within each field. – sdots Sep 25 '15 at 08:44
  • @PolyGeo yes I did indeed use the Project tool for that. – sdots Sep 25 '15 at 08:44
  • How big are your inputs (number of rows, disk size)? Since you only need the intersection of the inputs, you could also try the Intersect tool - http://resources.arcgis.com/en/help/main/10.1/index.html#//00080000000p000000. I would also try converting the shapefiles to the file geodatabase format and repairing the geometry of the inputs before processing - http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00170000003v000000. Have a look at this post if you still have issues - http://gis.stackexchange.com/questions/25357/divide-a-complex-shape-file-into-a-grid/25396#25396. – Brent Edwards Sep 25 '15 at 13:28
  • Thank you!!! the geometry repair seems to have done the trick - I now get a useful result with both union and intersect. However, the format is not the one I got from the tabulate areas, which makes using the code I already wrote for further processing difficult. Any suggestions on what would be the best way to now attach the results to the original feature class? I now have a dataset with many more polygons, a separate one for every single vegetation class within each brownfield. I would want to add the sum of the area per vegetation class to each row in my original brownfield dataset. – sdots Sep 28 '15 at 13:11
  • Great news! To attach the results to your original fc : 1) Add a field for each veg class (Double Precision) - ex. SUM_AREA_CLASS1) Isolate each brown field/veg type combination in your intersection result fc using a selection (ex. brownfield_field = 'type1' AND vegtype_field = 'class1') 3) Sum the shape_area (using summary statistics or by code ) 4) Join the sum results to your original brownfields fc and calculate the sum area fields (ex. SUM_AREA_CLASS1 = SUM_AREA_BROWNFIELD1_VEGCLASS1.SUM_AREA) – Brent Edwards Sep 28 '15 at 14:13
  • You could also try your raster workflow again, but using the repaired feature classes as your vector-to-raster inputs. – Brent Edwards Sep 28 '15 at 14:16
  • "the geometry repair seems to have done the trick" indicates that your original question has now become non-reproducible so if you have follow up questions please ask them separately. – PolyGeo Sep 28 '15 at 22:30

0 Answers0