anoved / Shapetcl

Simple shapefile access for Tcl.
MIT License
3 stars 0 forks source link

Research "closed ring" criteria - enforce all coords match, inc. M? #49

Closed anoved closed 11 years ago

anoved commented 11 years ago

Shapefile whitepaper indicates that polygon intersections are computed in X Y space for polygonM types (measure is disregarded). To validate closed polygon rings, i check that start/end vertex xy coordinates match (and that xyz coordinates match for polygonz type), but ignore m values. However, to be closed, it is implied the first and last vertices should indeed be the same, so it would seem reasonable to enforce that as well.

anoved commented 11 years ago

For a ring to be closed, the first and last points must be the same. For a point to be the same, all of its coordinates must be the same. (The statement about intersections being computed in XY space is irrelevant to this.)