官术网_书友最值得收藏!

Composing and decomposing geometries

One can think of PostGIS geometries as building blocks. The smallest unit, the point, consists of a tuple (in the most common scenario of 2D geometries, a pair) of coordinates. Points can be then used as independent units or arranged into more complex shapes: MultiPoints and LineStrings. LineStrings can constitute a MultiLineString. Closed LineStrings can be treated as rings and form a Polygon. Finally, multiple polygons may form a MultiPolygon. PostGIS is equipped with functions for coupling and decoupling those geometric building blocks, which will be outlined in this section.

Composition and decomposition functions have different names, but in general they follow a similar pattern: composition is done by supplying an array of components or using a PostgreSQL aggregation, and decomposition is done by extracting individual components by their index or by exploding a geometry into multiple rows using a set-returning function. For details of each geometry type, read on.

主站蜘蛛池模板: 桐乡市| 临桂县| 新丰县| 邹平县| 贵南县| 宜丰县| 大竹县| 九龙城区| 菏泽市| 菏泽市| 郎溪县| 松江区| 昆山市| 沿河| 廊坊市| 嘉善县| 克山县| 屯留县| 武平县| 会东县| 沂源县| 扬中市| 伊宁市| 渭源县| 周至县| 平和县| 曲沃县| 香格里拉县| 百色市| 和林格尔县| 商河县| 正宁县| 邹平县| 江达县| 呼伦贝尔市| 左贡县| 台南县| 江西省| 资阳市| 额尔古纳市| 沙洋县|