4

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?

5
  • In database world empty and null have different meaning. empty means that we know this should be empty where null means we do not know values of this attribute. Jun 15, 2015 at 8:25
  • Whilst I understand "we do not know values" I do not see any practical use for "this should be empty". Can you please further elaborate on this? Jun 15, 2015 at 8:33
  • My guess is they were created differently. One feature was once actually geometry however below the cluster tolerance of the geometry. The other feature might be a new row without the creation of geometry. At any rate you probably don't want either in a spatial database.
    – GISI
    Jun 15, 2015 at 9:08
  • 1
    Empty geometries may not be avoided in some use cases. It is possible that for example a new parcel is created by administration into a database but it has not been digitized yet. The geometry column in the parcel table may have a "not null" constraint for a good reason. Then an empty geometry may come to rescue. Using a dummy default geometry is another option and both has pros and cons. A technical reason is that some processing algorithms initialize the result table with empty geometries and populate them later and sometimes geometries may remain empty eg. intersection of distinct features.
    – user30184
    Jun 15, 2015 at 10:44
  • In many GIS systems outside of ESRI, an empty geometry is required to note that a geometry does not exist on the plane of reference. For example, if you have a gas pipeline dataset with one geometry column containing lines representing pipes, and, another column containing points representing valves on pipes then there may be sections of has pipes without valves - and these require an empty geometry. Nulls are normally used for unknown geometries which hold place if other attributes are populated first. A null geometry is used if you type a road name before digitising the road. Jul 23, 2018 at 10:29

1 Answer 1

5

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.

2
  • 2
    I agree except calling empty geometries as invalid. Empty geometry is a valid geometry. Shapefile spec calls empty geometries as null shapes A shape type of 0 indicates a null shape, with no geometric data for the shape. Each feature type (point, line, polygon, etc.) supports nulls and it is valid to have points and null points in the same shapefile. Often null shapes are place holders; they are used during shapefile creation and are populated with geometric data soon after they are created. Spatial databases return TRUE for SELECT ST_IsValid(ST_GeomFromText('POINT EMPTY'))
    – user30184
    Jun 15, 2015 at 15:34
  • @user30184 I agree and have clarified that it was esri that called them invalid. Jun 19, 2015 at 15:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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