2

In data formats like WKT and WKB, we have ways of representing "empty" geometries. That all pretty much makes sense: a "LINESTRING EMPTY" is a LINESTRING type with 0 vertices. Same with a MULTIPOINT, POLYGON, etc.

But what about POINT EMPTY? For starters, there is no WKB representation for a POINT EMPTY, only WKT. GeoJSON also doesn't define this case in its specification.

According to the Wikipedia definition of a geometric point, "points do not have any length, area, volume, or any other dimensional attribute". So how can it be empty, and why does the WKT specification allow this?

  • Why whould a line with zero vertices make sense, while a point with no vertices doesn't? They're all really nil geometries, special cases so that dimensionality can be preserved in a column which is restricted to a single datatype. – Vince Aug 8 '14 at 11:50
  • It doesn't make sense because POINTs are the primitive of all the other geometries. The other geometries are just collections of POINTs with some specific semantics. Geometrically speaking, a NULL geometry doesn't really make sense. But within a standard like WKB, it's allowed. The problem is, there is no way to represent a POINT EMPTY in WKB. This is a problem if you try to convert between different data formats. WKT and WKB are used very closely together, but there's an inconsistency. – larsbutler Aug 11 '14 at 9:12
  • 1
    An Empty Point has as much significance and use, as the number Zero. – Devdatta Tengshe Aug 11 '14 at 11:39
  • Which makes this the same question you asked last time. A point isn't a primitive, it's the most common type of data. The lack of an empty point in WKB is a flaw in WKB, not in the point type. – Vince Aug 11 '14 at 11:45
1

This is probably answered in Empty geometries in GEOMETRYCOLLECTION which refers also to http://trac.osgeo.org/postgis/wiki/DevWikiEmptyGeometry. A practical use case for many GIS programs like QGIS which can only hold one sort of geometries on a single layer is to make it possible to import attributes into a new layer and initialize it correctly so it can accept geometries which may come later. Therefore POINT EMPTY is useful and not the same as LINESTRING EMPTY.

That WKT defines POINT EMPTY but WKB not is a known issue. In recent OGC GeoPackage standard empty geometries are marked with a special flag http://www.geopackage.org/spec/. One reason for this is just the POINT EMPTY case and it is mentioned in the standard text:

"Well-Known Binary as defined in ISO 13249-3 [12] does not provide a standardized encoding for an empty point set (i.e., Point Empty in Well-Known Text). In GeoPackages these points SHALL be encoded as a Point where each coordinate value is set to an IEEE-754 quiet NaN value."

  • 1
    It wasn't really answered there. That question was specifically about the behavior of geometry collections of empty things. The current question is more about consistency within the standards. I'm more or less fine with there being a strange thing like a null/empty POINT, but the problem is, there's binary representation of it! – larsbutler Aug 11 '14 at 9:16
  • I do not know if such answer exists. Missing POINT EMPTY in WKB can perhaps be considered as a bug but accepted standards do not change so easily. However, the OGC GeoPackage standard considers this case geopackage.org/spec Well-Known Binary as defined in ISO 13249-3 [12] does not provide a standardized encoding for an empty point set (i.e., Point Empty in Well-Known Text). In GeoPackages these points SHALL be encoded as a Point where each coordinate value is set to an IEEE-754 quiet NaN value. – user30184 Aug 11 '14 at 9:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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