-
Notifications
You must be signed in to change notification settings - Fork 114
Description
This is opened from the comments from @otan and @andyyang890 in #197.
@otan wrote:
i think in go-geom, we want to relax things we check in CockroachDB (subject to @twpayne guidance!) as go-geom takes a more "OGC spec" view of the world, namely:
a) geometrycollections can have mixed dimensions.
b) linestrings/polygons do not have to have 2/4 points respectively, and polygon rings don't have to be closed.
c) i think empty can be mixed willy nilly in MultiPoint.we can choose to optionally allow these checks (but have them off by default). this should be done with options -- see how we did the
EncodeOptionforMarshalabove. probablyDecodeOptionRunPostGISCompatibilityCheckswhich enables all the checks we did above.
@andyyang890 replied:
a) geometrycollections can have mixed dimensions.
If the PostGIS compatibility option is not specified:
- Should a
GEOMETRYCOLLECTION{M, Z, ZM}be allowed to have geometries with different dimensions or does that only apply toGEOMETRYCOLLECTION?- Should the layout for a
GEOMETRYCOLLECTIONalways begeom.NoLayout?- If the answer to 1 is no, should the layout of a
*GeometryCollectionbe set if it is aGEOMETRYCOLLECTION{M, Z, ZM}or should it remain asgeom.NoLayout?