更新时间:2021-07-02 22:52:59
coverpage
Title Page
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Customer Feedback
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
Importing Spatial Data
Obtaining test data
Setting up the database
Importing flat data
Importing data using psql
Importing data interactively
Importing data non-interactively
Importing data using pgAdmin
Extracting spatial information from flat data
Importing shape files using shp2pgsql
shp2pgsql in cmd
The shp2pgsql GUI version
Importing vector data using ogr2ogr
Importing GML
Importing MIF and TAB
Importing KML
ogr2ogr GUI (Windows only)
Importing data using GIS clients
Exporting a shapefile to PostGIS using QGIS and SPIT
Exporting shapefile to PostGIS using QGIS and DbManager
Exporting spatial data to PostGIS from Manifold GIS
Importing OpenStreetMap data
Connecting to external data sources with foreign data wrappers
Connecting to SQL Server Spatial
Connecting to WFS service
Loading rasters using raster2pgsql
Importing a single raster
Importing multiple rasters
Importing data with pgrestore
Summary
Spatial Data Analysis
Composing and decomposing geometries
Creating points
Extracting coordinates from points
Composing and decomposing Multi-geometries
Multi-geometry decomposition
Composing and decomposing LineStrings
LineString composition
LineString decomposition
Composing and decomposing polygons
Polygon composition
Polygon decomposition
Spatial measurement
General warning - mind the SRID!
Measuring distances between two geometries
Measuring the length area and perimeter of geometries
Line length
Polygon perimeter
Polygon area
Geometry bounding boxes
Accessing bounding boxes
Creating bounding boxes
Using bounding boxes in spatial queries
Geometry simplification
Geometry validation
Simplicity and validity
Testing for simplicity and validity
Checking for validity
Repairing geometry errors
Validity constraint
Intersecting geometries
Nearest feature queries
Data Processing - Vector Ops
Primer - obtaining and importing OpenStreetMap data
Merging geometries
Merging polygons
Merging MultiLineStrings
Slicing geometries
Splitting a polygon by LineString
Splitting a LineString with another LineString
Extracting a section of LineString
Buffering and offsetting geometries
Offsetting features
Creating convex and concave hulls
Computing centroids points-on-surface and points-on-line
Reprojecting geometries
Spatial relationships
Touching
Crossing
Overlapping