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

Spatial Data Analysis

So far, we have learned how to store geospatial data in a PostGIS database. In fact, any database management system can do that; spatial information can be encoded and stored in an ordinary DBMS-friendly format, be it blob, byte array, or text-based exchange format. What makes the spatial database special (and the PostGIS extension worth installing) is the rich toolset designed for analyzing, transforming, validating, querying, and extracting metrics from spatial information. In this chapter, we will learn how to harness the power of PostGIS spatial functions to gain meaningful insights from geodata. We will focus on the following topics:

  • Composing and decomposing geometries
  • Spatial measurement
  • Geometry bounding boxes
  • Geometry simplification
  • Geometry validation
  • Intersecting geometries
  • Nearest feature queries

The example queries used in this chapter mostly use geometries created by hand, using geometry composition functions. For a few examples, the OSM data in osm2pgsql schema and Natural Earth data imported in Chapter 1, Importing Spatial Data, are used, but only the column and table names are specific; the queries can be adjusted to any other dataset, provided that the geometry type is the same.

主站蜘蛛池模板: 怀安县| 莱芜市| 屏山县| 呼和浩特市| 磐石市| 乡城县| 福建省| 巴里| 扶绥县| 博客| 屏南县| 平凉市| 东阿县| 察隅县| 宁安市| 淮安市| 勐海县| 大兴区| 溧水县| 广东省| 胶州市| 安顺市| 隆德县| 崇文区| 关岭| 榆中县| 罗城| 神池县| 克山县| 敖汉旗| 松阳县| 石台县| 讷河市| 同德县| 香格里拉县| 芜湖县| 榆社县| 寻甸| 西充县| 云阳县| 盘山县|