Muutke küpsiste eelistusi

PostGIS in Action 2nd edition [Pehme köide]

  • Formaat: Paperback / softback, 625 pages, kõrgus x laius x paksus: 235x190x30 mm, kaal: 995 g
  • Ilmumisaeg: 30-Apr-2015
  • Kirjastus: Manning Publications
  • ISBN-10: 1617291390
  • ISBN-13: 9781617291395
  • Formaat: Paperback / softback, 625 pages, kõrgus x laius x paksus: 235x190x30 mm, kaal: 995 g
  • Ilmumisaeg: 30-Apr-2015
  • Kirjastus: Manning Publications
  • ISBN-10: 1617291390
  • ISBN-13: 9781617291395
 

DESCRIPTION 

 

PostGIS is an open source spatial database extender for PostgreSQL. It equals or surpasses proprietary alternatives, allowing the creations of location-aware queries with just a few lines of SQL code, and provides a back-end for mapping, raster analysis, and routing applications with minimal effort.

 

 

PostGIS in Action, Second Edition teaches readers of all levels to write spatial queries that solve real-world problems. After covering the background in vector, raster and topology based GIS, it quickly moves into analyzing, viewing, and mapping data. The book shows how to optimize queries for maximum speed, simplify geometries for greater efficiency, analyze rasters, vectorize rasters, better manage data utilizing topologies, and create custom functions for applications. It covers PostGIS 2.0 and 2.1 series, PostgreSQL 9.1- 9.3 features and shows how to integrate with other GIS tools.  

 

 





 

RETAIL SELLING POINTS 

 

Comprehensive coverage of PostGIS

 

Applies PostGIS to real-world problems  

 

Significant updates to the first edition  

 

   

AUDIENCE

Familiarity with relational database concepts is helpful but not required. This book is for programmers, GIS and DB practitioners, scientists, researchers, educators, and engineers.

 

ABOUT THE TECHNOLOGY

 

PostGIS (pronounced post-jis) is a spatial database extender for the PostgreSQL open source relational database management system. Its the most powerful open source spatial database engine. It also adds to PostgreSQL several spatial data types and over 300 functions for working with these spatial types.  
Foreword xix
Preface xxi
Acknowledgments xxii
About this book xxiv
Part 1 Introduction To Postgis 1(244)
1 What is a spatial database?
3(24)
1.1 Thinking spatially
4(2)
1.2 Introducing PostGIS
6(8)
Why PostGIS
7(3)
Alternatives to PostGIS
10(2)
Installing PostGIS
12(2)
1.3 Spatial data types
14(3)
Geometry type
15(1)
Geography type
15(1)
Raster type
16(1)
Topology type
17(1)
1.4 Hello real world
17(9)
Digesting the problem
18(1)
Modeling
19(2)
Loading data
21(3)
Writing the query
24(1)
Viewing spatial data with OpenJump
25(1)
1.5 Summary
26(1)
2 Spatial data types
27(33)
2.1 Type modifiers
28(1)
Subtype type modifiers
28(1)
Spatial reference identifier
29(1)
2.2 Geometry
29(23)
Points
30(1)
Linestrings
31(1)
Polygons
32(2)
Collection geometries
34(4)
The M coordinate
38(2)
The Z coordinate
40(2)
Polyhedral surfaces and TINS
42(2)
Curved geometries
44(5)
Spatial catalog for geometry
49(2)
Managing geometry columns
51(1)
2.3 Geography
52(2)
Differences between geography and geometry
53(1)
Spatial catalogs for geography
54(1)
2.4 Raster
54(5)
Properties of rasters
55(1)
Creating rasters
56(2)
Spatial catalog for rasters
58(1)
2.5 Summary
59(1)
3 Spatial reference system considerations
60(22)
3.1 Spatial reference systems: what are they?
61(8)
Geoids
61(2)
Ellipsoids
63(2)
Datum
65(1)
Coordinate reference system
65(1)
Spatial reference system essentials
66(1)
Projections
66(3)
3.2 Selecting a spatial reference system for storing data
69(7)
Pros and cons of using EPSG:4326
70(1)
Geography data type for EPSG:4326
71(1)
Mapping just for presentation
71(3)
Covering the globe when distance is a concern
74(2)
3.3 Determining the spatial reference system of source data
76(5)
Guessing at a spatial reference system
77(3)
When the spatial
reference system is missing from spatial ref sys table
80(1)
3.4 Summary
81(1)
4 Working with real data
82(31)
4.1 General utilities
83(3)
PostgreSQL built-in tools
83(1)
Downloading files
84(1)
Extracting files
85(1)
4.2 Importing and exporting shapefiles
86(6)
Importing with shp2pgsql
87(1)
Importing and exporting with shp2pgsql-gui
88(3)
Exporting with pgsql2shp
91(1)
4.3 Importing and exporting vector data with ogr2ogr
92(7)
Environment variables
93(1)
Ogrinfo
93(1)
Importing with ogr2ogr
93(4)
Exporting with ogr2ogr
97(2)
4.4 Importing OpenStreetMap data with osm2pgsql
99(4)
Getting OSM data
100(1)
Loading OSM-formatted data with osm2pgsql
101(2)
4.5 Importing and exporting raster data
103(8)
Using gdalinfo to inspect rasters
103(2)
Importing raster data with
raster2pgsql
105(3)
Gdal translate and gdalwarp
108(2)
Using PostgreSQL functions to output raster data
110(1)
4.6 Summary
111(2)
5 Using PostGIS on the desktop
113(27)
5.1 Desktop viewing tools at a glance
114(6)
Capsule reviews
114(2)
Spatial database support
116(1)
Format support
117(2)
Web services supported
119(1)
5.2 OpenJUMP workbench
120(6)
OpenJUMP feature summary
120(1)
PostGIS support
121(1)
Register data source
122(1)
Rendering PostGIS geometries
123(2)
Exporting data
125(1)
5.3 QGIS
126(7)
Installing QGIS
126(1)
Using QGIS with PostGIS
126(5)
Importing and exporting layers
131(2)
5.4 uDig
133(2)
Using uDig with PostGIS
133(1)
Connecting to PostGIS
134(1)
Viewing and filtering PostGIS data
134(1)
5.5 gvSIG
135(4)
Using gvSIG with PostGIS
136(3)
Exporting data
139(1)
5.6 Summary
139(1)
6 Geometry and geography functions
140(35)
6.1 Output functions
141(5)
Well-known binary (WKB) and well-known text (WKT)
142(1)
Keyhole Markup Language (KML)
142(1)
Geography Markup Language (GML)
142(1)
Geometry JavaScript Object Notation (GeoJSON)
143(1)
Scalable Vector Graphics (SVG)
143(1)
Extensible 3D Graphics (X3D)
144(1)
Examples of output functions
144(1)
Geohash
145(1)
6.2 Constructor functions
146(5)
Creating geometries from text and binary formats
146(4)
Creating geographies from text and binary formats
150(1)
Using text or binary representations as function arguments
150(1)
6.3 Accessor and setter functions
151(7)
Spatial reference identifiers
151(1)
Transforming geometry to different spatial references
152(1)
Using transformation with the geography type
153(1)
Geometry type functions
153(2)
Geometry and coordinate dimensions
155(1)
Retrieving coordinates
155(1)
Checking geometry validity
156(1)
Number of points that defines a geometry
156(2)
6.4 Measurement functions
158(3)
Geometry planar measurements
159(1)
Geodetic measurements
160(1)
6.5 Decomposition functions
161(7)
Bounding box of geometries
161(2)
Boundaries and converting polygons to linestrings
163(2)
Centroid and point on surface
165(1)
Returning points defining a geometry
166(1)
Decomposing multi-geometries and geometry collections
167(1)
6.6 Composition functions
168(4)
Making points
169(1)
Making polygons
170(1)
Promoting single geometries to multi-geometries
171(1)
6.7 Simplification functions
172(2)
Grid snapping and coordinate rounding
172(1)
Simplification
172(2)
6.8 Summary
174(1)
7 Raster functions
175(28)
7.1 Raster terminology
176(2)
7.2 Raster constructors
178(8)
Converting geometries to rasters with ST AsRaster
179(2)
Loading rasters with raster2pgsql
181(1)
Constructing rasters from scratch: ST MakeEmptyRaster and ST AddBand
182(1)
Setting pixels: ST SetValue and ST SetValues
182(2)
Creating rasters from other rasters
184(2)
Converting other raster formats with
ST FromGDALRaster
186(1)
7.3 Raster output functions
186(4)
ST AsPNG, ST AsJPEG, and ST AsTiff
186(1)
Output using ST AsGDALRaster
187(2)
Using psql to export rasters
189(1)
7.4 Raster accessors and setters
190(6)
Basic raster metadata properties
191(1)
Pixel statistics
192(1)
Pixel value accessors
193(2)
Band metadata setters
195(1)
7.5 Georeferencing functions
196(4)
Metadata setters
196(1)
Processing functions
197(3)
7.6 Reclassing functions
200(1)
7.7 Polygonizing functions
201(1)
ST ConvexHull
201(1)
ST Envelope
201(1)
ST Polygon
201(1)
ST MinConvexHull
201(1)
7.8 Summary
202(1)
8 PostGIS TIGER geocoder
203(15)
8.1 Installing the PostGIS TIGER geocoder
204(1)
8.2 Loading TIGER data
205(2)
Configuration tables
205(1)
Loading nation and state data
205(2)
8.3 Normalizing addresses
207(4)
Using normalize address
207(1)
Using the PAGC address normalizer
208(3)
8.4 Geocoding
211(5)
Geocoding using address text
212(2)
Geocoding using normalized addresses
214(1)
Batch geocoding
214(2)
8.5 Reverse geocoding
216(1)
8.6 Summary
217(1)
9 Geometry relationships
218(27)
9.1 Bounding box and geometry comparators
219(3)
The bounding box
219(2)
Bounding box comparators
221(1)
9.2 Relating two geometries
222(12)
Interior, exterior, and boundary of a geometry
222(1)
Intersections
222(5)
A house plan model
227(1)
Contains and within
228(2)
Covers and covered by
230(1)
Contains properly
230(2)
Overlapping geometries
232(1)
Touching geometries
232(1)
Crossing geometries
233(1)
Disjoint geometries
234(1)
9.3 The faces of equality: geometry
234(5)
Spatial equality versus geometric equality
235(1)
Bounding-box equality
236(3)
9.4 Underpinnings of relationship functions
239(5)
The intersection matrix
240(1)
Using ST Relate
241(3)
9.5 Summary
244(1)
Part 2 Putting Postgis To Work 245(162)
10 Proximity analysis
247(14)
10.1 Nearest neighbor searches
248(7)
Which places are within X distance?
248(1)
Using ST DWithin and ST Distance for N closest results
248(1)
Using ST DWithin and DISTINCT ON to find closest locations
249(1)
Intersects with tolerance
250(1)
Finding N closest places using KNN distance bounding-box operators
250(2)
Combining KNN distance-box operators with ST Distance
252(2)
Using window functions to find closest N places
254(1)
10.2 Using KNN with geography types
255(1)
10.3 Geotagging
256(3)
Tagging data to a specific region
257(1)
Linear referencing: snapping points to the closest linestring
258(1)
10.4 Summary
259(2)
11 Geometry and geography processing
261(26)
11.1 Using spatial aggregate functions
262(3)
Creating a multipolygon from many multipolygon records
262(2)
Creating linestrings from points
264(1)
11.2 Clipping, splitting, tessellating
265(9)
Clipping
266(1)
Splitting
267(1)
Tessellating
268(6)
11.3 Breaking linestrings into smaller segments
274(5)
Segmentizing linestrings
274(1)
Creating two-point linestrings from many-point linestrings
275(1)
Breaking linestrings at point junctions
276(3)
11.4 Translating, scaling, and rotating geometries
279(5)
Translating
279(2)
Scaling
281(2)
Rotating
283(1)
11.5 Using geometry functions to manipulate and create geographies
284(2)
Cast-safe functions
284(1)
Transformation-recommended functions
285(1)
11.6 Summary
286(1)
12 Raster processing
287(22)
12.1 Loading and preparing data
288(2)
12.2 Forming larger rasters using spatial aggregate functions
290(2)
Reconstituting tiled files
290(1)
Carving out areas of interest using clipping and unioning
291(1)
Using specific expression types with ST Union
291(1)
12.3 Working with bands
292(2)
Using ST AddBand to form multiband rasters from single-band rasters
292(1)
Using ST Band to process a subset of bands
293(1)
12.4 Tiling rasters
294(1)
12.5 Raster and geometry intersections
295(4)
Pixel stats
296(1)
Adding a Z coordinate to a 2D linestring using ST Value
297(1)
Converting 2D polygon to 3D polygon
298(1)
12.6 Raster statistics
299(4)
Extruding pixel values
299(2)
Raster statistics functions
301(2)
12.7 Map algebra
303(5)
Choosing between expression or callback function
304(1)
Using a single-band map algebra expression
304(1)
Using a single-band map algebra function
305(1)
Map algebra with neighborhoods
306(2)
12.8 Summary
308(1)
13 Building and using topologies
309(28)
13.1 What topology is
310(1)
13.2 Using topologies
311(8)
Installing the topology extension
312(1)
Creating a topology
312(4)
The topogeometry type
316(3)
Recap of using topologies
319(1)
13.3 Topology of Victoria, BC
319(7)
Creating the Victoria topology
319(1)
Adding primitives to a topology
320(3)
Creating topogeometries
323(3)
13.4 Fixing topogeometry issues by editing topology primitives
326(5)
Removing faces by removing edges
328(2)
Checking for shared faces
330(1)
Editing topogeometries
330(1)
13.5 Inserting and editing large data sets
331(2)
13.6 Simplifying with topology in mind
333(2)
13.7 Topology validation and summary functions
335(1)
13.8 Summary
336(1)
14 Organizing spatial data
337(32)
14.1 Spatial storage approaches
338(8)
Heterogeneous columns
338(2)
Homogeneous columns
340(1)
Typmod versus constraints
341(2)
Table inheritance
343(3)
14.2 Modeling a real city
346(11)
Modeling using heterogeneous geometry columns
348(4)
Modeling using homogeneous geometry columns
352(1)
Modeling using inheritance
353(4)
14.3 Making auto-updateable views
357(1)
14.4 Using rules and triggers
358(10)
Rules versus triggers
358(2)
Using rules
360(1)
Using triggers
361(7)
14.5 Summary
368(1)
15 Query performance tuning
369(38)
15.1 The query planner
370(2)
Different kinds of spatial queries
370(2)
Common table expressions and how they affect plans
372(1)
15.2 Planner statistics
372(2)
15.3 Using explain to diagnose problems
374(6)
Text explain versus pgAdmin graphical explain
375(1)
The plan with no index
376(4)
15.4 Planner and indexes
380(6)
The plan with a spatial index
381(1)
Options for defining indexes
382(4)
15.5 Common SQL patterns and how they affect plans
386(12)
SELECT subqueries
386(6)
FROM subqueries and basic CTEs
392(1)
Window functions and self-joins
393(2)
Laterals
395(3)
15.6 System and function settings
398(4)
Key system variables that affect plan strategy
399(2)
Function-specific settings
401(1)
15.7 Optimizing spatial data
402(4)
Fixing invalid geometries
403(1)
Reducing the number of vertices by simplification
403(1)
Clustering
403(3)
15.8 Summary
406(1)
Part 3 Using Postgis With Other Tools 407(72)
16 Extending PostGIS with pgRouting and procedural languages
409(33)
16.1 Solving network routing problems with pgRouting
410(6)
Installing pgRouting
411(1)
Basic navigation
411(3)
Traveling salesman
414(2)
16.2 Extending PostgreSQL with PLs
416(2)
Basic installation of PLs
416(1)
What you can do with PLs
417(1)
16.3 PL/R
418(9)
Getting started with PL/R
419(1)
Saving data sets and plotting
420(3)
Using R packages in PL/R
423(2)
Converting geometries into R spatial objects and plotting spatial objects
425(2)
Outputting plots as binaries
427(1)
16.4 PL/Python
427(6)
Installing PL/Python
428(1)
Writing a PL/Python function
429(1)
Using Python packages
430(2)
Geocoding example
432(1)
16.5 PL/V8, CoffeeScript, and LiveScript
433(8)
Installing PL/V8
434(1)
Using other favaScript libraries and functions in PL/V8
434(4)
Using PL/V8 to write map algebra functions
438(3)
16.6 Summary
441(1)
17 Using PostGIS in web applications
442(37)
17.1 Limitations of conventional web technologies
443(1)
17.2 Mapping servers
444(4)
Platform considerations
445(1)
OGC web service support
446(1)
Supported data sources
447(1)
17.3 Mapping clients
448(2)
Proprietary services
448(2)
17.4 Using MapServer
450(6)
Installing MapServer
450(2)
Creating WMS and WFS services
452(2)
Calling a mapping service using a reverse proxy
454(2)
17.5 Using GeoServer
456(4)
Installing GeoServer
456(1)
Setting up PostGIS workspaces
457(2)
Accessing PostGIS layers via GeoServer WMS/WFS
459(1)
17.6 Basics of OpenLayers and Leaflet
460(8)
OpenLayers primer
462(4)
Leaflet primer
466(1)
Synopsis of the three different APIs
467(1)
17.7 Displaying data with PostGIS queries and web scripting
468(10)
Displaying PostGIS rasters using raster queries
468(5)
Using PostGIS and PostgreSQL geometry output functions
473(5)
17.8 Summary
478(1)
Appendix A Additional Resources 479(6)
Appendix B Installing, Compiling, And Upgrading 485(8)
Appendix C Sql Primer 493(23)
Appendix D Postgresql Features 516(36)
Index 552
AUTHOR BIO





Regina Obe and Leo Hsu are database consultants. They are co-authors of the O'Reilly book, PostgreSQL: Up and Running. Regina is a member of the PostGIS core development team and the Project Steering Committee. They are hosts of BostonGIS.com and PostgresOnLine.com.