Reputation: 1743
I would like to declare a regular polygon, in this case a square without duplicated points. The problem is that the following statement returns 5, but one would expect 4.
SELECT ST_NPoints(ST_GeomFromText('POLYGON((0 0, 1 0, 1 1, 0 1, 0 0))'));
But without the last point I get an error
ERROR: geometry contains non-closed rings
What am I missing?
Upvotes: 0
Views: 342