pgRouting Manual (2.0.0-alpha)

pgr_pointsAsPolygon - Polygon around set of points

«  pgr_drivingDistance - Driving Distance   ::   Contents   ::   Legacy Functions  »

pgr_pointsAsPolygon - Polygon around set of points

Name

pgr_pointsAsPolygon — Draws an alpha shape around given set of points.

Synopsis

Returns the alpha shape as polygon geometry.

geometry pgr_pointsAsPolygon(text sql);

Description

sql:

text a SQL query, which should return a set of rows with the following columns:

SELECT id, x, y FROM vertex_result;
id:int4 identifier of the vertex
x:float8 x-coordinate
y:float8 y-coordinate

Returns a polygon geometry.

History

  • Renamed in version 2.0.0

Examples

SELECT ST_AsText(pgr_pointsAsPolygon('SELECT id, x, y FROM vertex_table'));

               st_astext
----------------------------------------
 POLYGON((2 0,4 1,4 2,4 3,2 4,0 2,2 0))
(1 row)

The queries use the Sample Data network.

«  pgr_drivingDistance - Driving Distance   ::   Contents   ::   Legacy Functions  »