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

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.

主站蜘蛛池模板: 油尖旺区| 抚州市| 澎湖县| 永定县| 武穴市| 石城县| 拜泉县| 富阳市| 华宁县| 白朗县| 喀什市| 资溪县| 西昌市| 大理市| 吴桥县| 阿尔山市| 建德市| 韶关市| 义乌市| 乌什县| 秭归县| 平陆县| 建阳市| 开封县| 四川省| 深水埗区| 通城县| 道孚县| 闽侯县| 弥渡县| 昆山市| 宁陕县| 壶关县| 肇源县| 扎鲁特旗| 临颍县| 平遥县| 江北区| 嘉义县| 耿马| 方正县|