PostGIS in action

Processing data tied to location and topology requires specialized know-how. PostGIS is a free spatial database extender for PostgreSQL, every bit as good as proprietary software. With it, you can easily create location-aware queries in just a few lines of SQL code and build the back end for a mappi...

Descripción completa

Detalles Bibliográficos
Otros Autores: Obe, Regina O., author (author), Hsu, Leo S., author
Formato: Libro electrónico
Idioma:Inglés
Publicado: Shelter Island, New York : Manning [2015]
Edición:Second edition
Materias:
Ver en Biblioteca Universitat Ramon Llull:https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009630031906719
Tabla de Contenidos:
  • Intro
  • PostGIS in Action, Second Edition
  • Regina O. Obe and Leo S. Hsu
  • Copyright
  • Dedication
  • Brief Table of Contents
  • Table of Contents
  • Praise for the First Edition of PostGIS in Action
  • Foreword
  • Preface
  • Acknowledgments
  • About this Book
  • Who should read this book?
  • GIS practitioners and programmers
  • DB practitioners
  • Scientists, researchers, educators, and engineers
  • Roadmap
  • Part 1: Learning PostGIS
  • Part 2: Putting PostGIS to work
  • Part 3: Using PostGIS with other tools
  • Appendixes
  • Code and other conventions
  • Code downloads
  • Author Online
  • About the title
  • About the cover illustration
  • Part 1. Introduction to PostGIS
  • Chapter 1. What is a spatial database?
  • 1.1. Thinking spatially
  • 1.2. Introducing PostGIS
  • 1.2.1. Why PostGIS
  • 1.2.2. Alternatives to PostGIS
  • 1.2.3. Installing PostGIS
  • 1.3. Spatial data types
  • 1.3.1. Geometry type
  • 1.3.2. Geography type
  • 1.3.3. Raster type
  • 1.3.4. Topology type
  • 1.4. Hello real world
  • 1.4.1. Digesting the problem
  • 1.4.2. Modeling
  • 1.4.3. Loading data
  • 1.4.4. Writing the query
  • 1.4.5. Viewing spatial data with OpenJump
  • 1.5. Summary
  • Chapter 2. Spatial data types
  • 2.1. Type modifiers
  • 2.1.1. Subtype type modifiers
  • 2.1.2. Spatial reference identifier
  • 2.2. Geometry
  • 2.2.1. Points
  • 2.2.2. Linestrings
  • 2.2.3. Polygons
  • 2.2.4. Collection geometries
  • 2.2.5. The M coordinate
  • 2.2.6. The Z coordinate
  • 2.2.7. Polyhedral surfaces and TINs
  • 2.2.8. Curved geometries
  • 2.2.9. Spatial catalog for geometry
  • 2.2.10. Managing geometry columns
  • 2.3. Geography
  • 2.3.1. Differences between geography and geometry
  • 2.3.2. Spatial catalogs for geography
  • 2.4. Raster
  • 2.4.1. Properties of rasters
  • 2.4.2. Creating rasters
  • 2.4.3. Spatial catalog for rasters
  • 2.5. Summary.
  • Chapter 3. Spatial reference system considerations
  • 3.1. Spatial reference systems: what are they?
  • 3.1.1. Geoids
  • 3.1.2. Ellipsoids
  • 3.1.3. Datum
  • 3.1.4. Coordinate reference system
  • 3.1.5. Spatial reference system essentials
  • 3.1.6. Projections
  • 3.2. Selecting a spatial reference system for storing data
  • 3.2.1. Pros and cons of using EPSG:4326
  • 3.2.2. Geography data type for EPSG:4326
  • 3.2.3. Mapping just for presentation
  • 3.2.4. Covering the globe when distance is a concern
  • 3.3. Determining the spatial reference system of source data
  • 3.3.1. Guessing at a spatial reference system
  • 3.3.2. When the spatial reference system is missing from spatial_ref_sys table
  • 3.4. Summary
  • Chapter 4. Working with real data
  • 4.1. General utilities
  • 4.1.1. PostgreSQL built-in tools
  • 4.1.2. Downloading files
  • 4.1.3. Extracting files
  • 4.2. Importing and exporting shapefiles
  • 4.2.1. Importing with shp2pgsql
  • 4.2.2. Importing and exporting with shp2pgsql-gui
  • 4.2.3. Exporting with pgsql2shp
  • 4.3. Importing and exporting vector data with ogr2ogr
  • 4.3.1. Environment variables
  • 4.3.2. Ogrinfo
  • 4.3.3. Importing with ogr2ogr
  • 4.3.4. Exporting with ogr2ogr
  • 4.4. Importing OpenStreetMap data with osm2pgsql
  • 4.4.1. Getting OSM data
  • 4.4.2. Loading OSM-formatted data with osm2pgsql
  • 4.5. Importing and exporting raster data
  • 4.5.1. Using gdalinfo to inspect rasters
  • 4.5.2. Importing raster data with raster2pgsql
  • 4.5.3. Gdal_translate and gdalwarp
  • 4.5.4. Using PostgreSQL functions to output raster data
  • 4.6. Summary
  • Chapter 5. Using PostGIS on the desktop
  • 5.1. Desktop viewing tools at a glance
  • 5.1.1. Capsule reviews
  • 5.1.2. Spatial database support
  • 5.1.3. Format support
  • 5.1.4. Web services supported
  • 5.2. OpenJUMP workbench
  • 5.2.1. OpenJUMP feature summary.
  • 5.2.2. PostGIS support
  • 5.2.3. Register data source
  • 5.2.4. Rendering PostGIS geometries
  • 5.2.5. Exporting data
  • 5.3. QGIS
  • 5.3.1. Installing QGIS
  • 5.3.2. Using QGIS with PostGIS
  • 5.3.3. Importing and exporting layers
  • 5.4. uDig
  • 5.4.1. Using uDig with PostGIS
  • 5.4.2. Connecting to PostGIS
  • 5.4.3. Viewing and filtering PostGIS data
  • 5.5. gvSIG
  • 5.5.1. Using gvSIG with PostGIS
  • 5.5.2. Exporting data
  • 5.6. Summary
  • Chapter 6. Geometry and geography functions
  • 6.1. Output functions
  • 6.1.1. Well-known binary (WKB) and well-known text (WKT)
  • 6.1.2. Keyhole Markup Language (KML)
  • 6.1.3. Geography Markup Language (GML)
  • 6.1.4. Geometry JavaScript Object Notation (GeoJSON)
  • 6.1.5. Scalable Vector Graphics (SVG)
  • 6.1.6. Extensible 3D Graphics (X3D)
  • 6.1.7. Examples of output functions
  • 6.1.8. Geohash
  • 6.2. Constructor functions
  • 6.2.1. Creating geometries from text and binary formats
  • 6.2.2. Creating geographies from text and binary formats
  • 6.2.3. Using text or binary representations as function arguments
  • 6.3. Accessor and setter functions
  • 6.3.1. Spatial reference identifiers
  • 6.3.2. Transforming geometry to different spatial references
  • 6.3.3. Using transformation with the geography type
  • 6.3.4. Geometry type functions
  • 6.3.5. Geometry and coordinate dimensions
  • 6.3.6. Retrieving coordinates
  • 6.3.7. Checking geometry validity
  • 6.3.8. Number of points that defines a geometry
  • 6.4. Measurement functions
  • 6.4.1. Geometry planar measurements
  • 6.4.2. Geodetic measurements
  • 6.5. Decomposition functions
  • 6.5.1. Bounding box of geometries
  • 6.5.2. Boundaries and converting polygons to linestrings
  • 6.5.3. Centroid and point on surface
  • 6.5.4. Returning points defining a geometry
  • 6.5.5. Decomposing multi-geometries and geometry collections
  • 6.6. Composition functions.
  • 6.6.1. Making points
  • 6.6.2. Making polygons
  • 6.6.3. Promoting single geometries to multi-geometries
  • 6.7. Simplification functions
  • 6.7.1. Grid snapping and coordinate rounding
  • 6.7.2. Simplification
  • 6.8. Summary
  • Chapter 7. Raster functions
  • 7.1. Raster terminology
  • 7.2. Raster constructors
  • 7.2.1. Converting geometries to rasters with ST_AsRaster
  • 7.2.2. Loading rasters with raster2pgsql
  • 7.2.3. Constructing rasters from scratch: ST_MakeEmptyRaster and ST_AddBand
  • 7.2.4. Setting pixels: ST_SetValue and ST_SetValues
  • 7.2.5. Creating rasters from other rasters
  • 7.2.6. Converting other raster formats with ST_FromGDALRaster
  • 7.3. Raster output functions
  • 7.3.1. ST_AsPNG, ST_AsJPEG, and ST_AsTiff
  • 7.3.2. Output using ST_AsGDALRaster
  • 7.3.3. Using psql to export rasters
  • 7.4. Raster accessors and setters
  • 7.4.1. Basic raster metadata properties
  • 7.4.2. Pixel statistics
  • 7.4.3. Pixel value accessors
  • 7.4.4. Band metadata setters
  • 7.5. Georeferencing functions
  • 7.5.1. Metadata setters
  • 7.5.2. Processing functions
  • 7.6. Reclassing functions
  • 7.7. Polygonizing functions
  • 7.7.1. ST_ConvexHull
  • 7.7.2. ST_Envelope
  • 7.7.3. ST_Polygon
  • 7.7.4. ST_MinConvexHull
  • 7.8. Summary
  • Chapter 8. PostGIS TIGER geocoder
  • 8.1. Installing the PostGIS TIGER geocoder
  • 8.2. Loading TIGER data
  • 8.2.1. Configuration tables
  • 8.2.2. Loading nation and state data
  • 8.3. Normalizing addresses
  • 8.3.1. Using normalize_address
  • 8.3.2. Using the PAGC address normalizer
  • 8.4. Geocoding
  • 8.4.1. Geocoding using address text
  • 8.4.2. Geocoding using normalized addresses
  • 8.4.3. Batch geocoding
  • 8.5. Reverse geocoding
  • 8.6. Summary
  • Chapter 9. Geometry relationships
  • 9.1. Bounding box and geometry comparators
  • 9.1.1. The bounding box
  • 9.1.2. Bounding box comparators.
  • 9.2. Relating two geometries
  • 9.2.1. Interior, exterior, and boundary of a geometry
  • 9.2.2. Intersections
  • 9.2.3. A house plan model
  • 9.2.4. Contains and within
  • 9.2.5. Covers and covered by
  • 9.2.6. Contains properly
  • 9.2.7. Overlapping geometries
  • 9.2.8. Touching geometries
  • 9.2.9. Crossing geometries
  • 9.2.10. Disjoint geometries
  • 9.3. The faces of equality: geometry
  • 9.3.1. Spatial equality versus geometric equality
  • 9.3.2. Bounding-box equality
  • 9.4. Underpinnings of relationship functions
  • 9.4.1. The intersection matrix
  • 9.4.2. Using ST_Relate
  • 9.5. Summary
  • Part 2. Putting PostGIS to work
  • Chapter 10. Proximity analysis
  • 10.1. Nearest neighbor searches
  • 10.1.1. Which places are within X distance?
  • 10.1.2. Using ST_DWithin and ST_Distance for N closest results
  • 10.1.3. Using ST_DWithin and DISTINCT ON to find closest locations
  • 10.1.4. Intersects with tolerance
  • 10.1.5. Finding N closest places using KNN distance bounding-box operators
  • 10.1.6. Combining KNN distance-box operators with ST_Distance
  • 10.1.7. Using window functions to find closest N places
  • 10.2. Using KNN with geography types
  • 10.3. Geotagging
  • 10.3.1. Tagging data to a specific region
  • 10.3.2. Linear referencing: snapping points to the closest linestring
  • 10.4. Summary
  • Chapter 11. Geometry and geography processing
  • 11.1. Using spatial aggregate functions
  • 11.1.1. Creating a multipolygon from many multipolygon records
  • 11.1.2. Creating linestrings from points
  • 11.2. Clipping, splitting, tessellating
  • 11.2.1. Clipping
  • 11.2.2. Splitting
  • 11.2.3. Tessellating
  • 11.3. Breaking linestrings into smaller segments
  • 11.3.1. Segmentizing linestrings
  • 11.3.2. Creating two-point linestrings from many-point linestrings
  • 11.3.3. Breaking linestrings at point junctions.
  • 11.4. Translating, scaling, and rotating geometries.