ST_NPoints returns the number of points that make up a geometry. For polygon analysis, it provides a quick measure of boundary complexity before examining area or spatial relationships. section 10.5.2
Count polygon boundary points
SELECT name, tourism, ST_NPoints(way) FROM florida.planet_osm_polygon WHERE name = 'Walt Disney World'; The query returns Walt Disney World with 473 points, indicating a detailed polygon boundary. section 10.5.2
Listing 10.16 Finding a polygon and the number of points it’s made of
SELECT name, tourism, ST_NPoints(way) FROM florida.planet_osm_polygon WHERE name = 'Walt Disney World';
Use the runnable listing to count points for a named polygon, then compare the returned value with the sample output. section 10.5.2
