Sunday, 10 July 2016

arcgis desktop - Difference between empty and NULL geometry in file geodatabase?


Within my application that connects to a ArcGIS-FileGDB I encounter problems on empty-geometries within my featureclass.


There are three features within my FeatureClass (polygon):



  • one ordinary polygon,

  • one without any geometry information (geometry = NULL) and

  • one with an empty geometry (at least when I access it via Feature.Shape.IsEmpty).



Confusingly the SHP.Area and SHP-Length columns for this last features are zero whereas the data for the actual NULL-geometry is NULL.


So what exactly is the difference on those two geometries?



Answer



A NULL in the Geometry column is just like any other NULL - it is special marker used to indicate that a data value does not exist


An Empty Geometry is a geometry value that has no points. This can happen when importing or editing/creating data programmatically.


ESRI's Data Reviewer Tool for Finding Invalid Geometry will flag both of these conditions. From an ESRI Blog on the subject:



Empty geometry


The geometry of a feature is considered empty if it has zero or no points and it does not contain geometric information (represented by SHAPE _LEN and/or SHAPE_AREA fields) beyond its original initialization state.



Note:


A point/multipoint geometry type contains point(s) as its geometry information. A line/polyline geometry type contains line segment(s) as its geometry information which is again represented by points. A polygon geometry type contains rings (formed by line segments) as its geometry information which is again represented by points.


Empty geometries can be introduced when editing or creating data programmatically and when importing bad data into your GIS.



No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...