twpayne / go-geom

Package geom implements efficient geometry types for geospatial applications.
BSD 2-Clause "Simplified" License
839 stars 104 forks source link

Don't consider coordinates beyond Z when testing for polygon closure #221

Closed twpayne closed 1 year ago

twpayne commented 1 year ago

From PostGIS:

postgis=# SELECT ST_IsClosed('POLYGON ZM ((0 0 0 0, 1 0 -1 1, 1 1 -2 2, 0 0 0 3))'::geometry);
 st_isclosed
-------------
 t
(1 row)

Note that the polygon is considered closed, even though the M coordinates of the first and last points differ.