[postgis-users] ST_NPoints for geography type?

Phineas Jensen phin at zayda.net
Tue Aug 3 13:21:10 PDT 2021


I am very new to GIS software and PostGIS in general, so please forgive 
my likely ignorance.

I have a database with a geography field, which I generally use for 
points, linestrings, and polygons. For one use case, I need to count the 
number of points in that field of each row, but I've found the 
ST_NPoints function doesn't exist for the geography type. I know 
geography has fewer functions and capabilities because of the greater 
complexity of the type, but it seems like ST_NPoints should work 
regardless of that, because it just counts the number of vertices. Is 
there a reason this function doesn't exist for geography, or is there an 
alternative?

Thanks,
Phineas J.



More information about the postgis-users mailing list