<div dir="ltr"><div dir="ltr"><div><br></div><div>Hi list, <br></div><div><br></div><div>I'm implementing postgis compatible functions for R, so I wanted to make sure I had the right behavior. I wanted to check that the behavior of ST_NPoints was consistent with expectations.</div><div><span style="font-family:courier new,monospace">SELECT ST_NPoints('POLYGON((0 0, 1 1, 2 0, 0 0))'::geometry);<br>#>  st_npoints <br>#> ------------<br>#>           4</span></div><div>I would have expected that the repeated vertex wouldn't be counted (a triangle would have 3 vertices). The doc (<i>Return the number of points in a geometry</i>) seems to imply that the behavior is correct though, since a point isn't necessarly a vertex; but it still leaves room to interpretation.<br></div><div><br></div><div>Etienne<br></div><div><br></div></div></div>