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

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.

主站蜘蛛池模板: 炉霍县| 沧源| 曲麻莱县| 措勤县| 霞浦县| 井研县| 东山县| 南充市| 永平县| 吴忠市| 车致| 崇文区| 江西省| 远安县| 灵川县| 惠来县| 肥乡县| 兴安县| 贵定县| 资兴市| 德安县| 麻城市| 绥芬河市| 水城县| 花垣县| 铁岭县| 汉阴县| 凌云县| 逊克县| 调兵山市| 寻甸| 齐河县| 海安县| 柯坪县| 蒲江县| 新乡市| 绿春县| 桑植县| 集安市| 永仁县| 武川县|