PostGIS之路——几何对象处理函数(一)

1、ST_Buffer

     获取缓冲后的几何对象

geometry ST_Buffer(geometry g1, float radius_of_buffer);
geometry ST_Buffer(geometry g1, float radius_of_buffer, integer num_seg_quarter_circle);
geometry ST_Buffer(geometry g1, float radius_of_buffer, text buffer_style_parameters);
geography ST_Buffer(geography g1, float radius_of_buffer_in_meters);

示例:

 

2、ST_BuildArea

     由给定的构成线工作组的几何对象, 创建一个区域几何形状。输出的将是:LINESTRINGS,MULTILINESTRINGS, POLYGONS, MULTIPOLYGONS,和GeometryCollections.

geometry ST_BuildArea(geometry A);

示例:

3、ST_Collect

      从其他几何对象的集合中返回一个空间ST_Geometry的值。

geometry ST_Collect(geometry set g1field);
geometry ST_Collect(geometry g1, geometry g2);
geometry ST_Collect(geometry[] g1_array);

示例:
SELECT stusps,
ST_Multi(ST_Collect(f.the_geom)) as singlegeom
FROM (SELECT stusps, (ST_Dump(the_geom)).geom As the_geom
FROM
somestatetable ) As f
GROUP BY stusps

4、ST_ConcaveHull

       几何形状是一个可能几何包围所有几何集合可以认为它是收缩包装。

geometry ST_ConcaveHull(geometry geomA, float target_percent, boolean allow_holes=false);

示例:

 

5、ST_ConvexHull

       获取多几何对象的外接对象。

geometry ST_ConvexHull(geometry geomA);

示例:

 

 

     

 

     

posted @ 2013-03-31 23:04  清灵阁主  阅读(1884)  评论(0编辑  收藏  举报