[postgis-devel] ST_NumPoints vs ST_NPoints

Obe, Regina robe.dnd at cityofboston.gov
Fri Jul 18 05:14:53 PDT 2008


Isn't ST_NumPoints an OGC defined spec item and ST_NPoints is a postgis
creation. 

If you are binding internally to ST_NPoints I think that is okay, but I
think ST_NumPoints should then do a validation check to make sure a line
string is passed to it, or is that not required by the specs.  I
consider it along the same lines as the same sillyness with
ST_PolyFromtext, ST_PointFromText etc.  Those do validation checksand
just map to GeomFromText

I'm moving those functions to the new section now by the way.  So let me
know any thing you want me to add.

-----Original Message-----
From: postgis-devel-bounces at postgis.refractions.net
[mailto:postgis-devel-bounces at postgis.refractions.net] On Behalf Of Paul
Ramsey
Sent: Thursday, July 17, 2008 3:42 PM
To: PostGIS Development Discussion
Subject: [postgis-devel] ST_NumPoints vs ST_NPoints

Why would I ever use ST_NumPoints, which fails if handed anything but
a linestring or circular string? It has no merits, it just requires
more work to use... if I want the number of vertices in a polygon, I
can either just use npoints, or I can carefully deconstruct the thing
into rings before using numpoints.  I think we should bind numpoints
to the npoints backend function and call it a day.

P.
_______________________________________________
postgis-devel mailing list
postgis-devel at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-devel
-----------------------------------------
The substance of this message, including any attachments, may be
confidential, legally privileged and/or exempt from disclosure
pursuant to Massachusetts law. It is intended
solely for the addressee. If you received this in error, please
contact the sender and delete the material from any computer.




More information about the postgis-devel mailing list