更新时间:2021-07-30 10:13:41
封面
版权页
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files eBooks discount offers and more
Preface
What this book covers
What you need for this book
Who this book is for
Sections
Conventions
Reader feedback
Customer support
Chapter 1. Setting Up Your Geospatial Python Environment
Introduction
Installing virtualenv and virtualenvwrapper
Installing pyproj and NumPy
Installing shapely matplotlib and descartes
Installing pyshp geojson and pandas
Installing SciPy PySAL and IPython
Installing GDAL and OGR
Installing GeoDjango and PostgreSQL with PostGIS
Chapter 2. Working with Projections
Discovering projection(s) of a Shapefile or GeoJSON dataset
Listing projection(s) from a WMS server
Creating a projection definition for a Shapefile if it does not exist
Batch setting the projection definition of a folder full of Shapefiles
Reprojecting a Shapefile from one projection to another
Chapter 3. Moving Spatial Data from One Format to Another
Converting a Shapefile to a PostGIS table using ogr2ogr
Batch importing a folder of Shapefiles into PostGIS using ogr2ogr
Batch exporting a list of tables from PostGIS to Shapefiles
Converting an OpenStreetMap (OSM) XML to a Shapefile
Converting a Shapefile (vector) to a GeoTiff (raster)
Converting a raster (GeoTiff) to a vector (Shapefile) using GDAL
Creating a Shapefile from point data stored in Microsoft Excel
Converting an ESRI ASCII DEM to an image height map
Chapter 4. Working with PostGIS
Executing a PostGIS ST_Buffer analysis query and exporting it to GeoJSON
Finding out whether a point is inside a polygon
Splitting LineStrings at intersections using ST_Node
Checking the validity of LineStrings
Executing a spatial join and assigning point attributes to a polygon
Conducting a complex spatial analysis query using ST_Distance()
Chapter 5. Vector Analysis
Clipping LineStrings to an area of interest
Splitting polygons with lines
Finding the location of a point on a line using linear referencing
Snapping a point to the nearest line
Calculating 3D ground distance and total elevation gain
Chapter 6. Overlay Analysis
Punching holes in polygons with a symmetric difference operation
Union polygons without merging
Union polygons with merging (dissolving)
Performing an identity function (difference + intersection)
Chapter 7. Raster Analysis
Loading a DEM USGS ACSII CDED into PostGIS
Creating an elevation profile
Creating a hillshade raster from your DEM with ogr
Generating slope and aspect images from your DEM
Merging rasters to generate a color relief map
Chapter 8. Network Routing Analysis
Finding the Dijkstra shortest path with pgRouting
Finding the Dijkstra shortest path with NetworkX in pure Python
Generating evacuation polygons based on an indoor shortest path
Creating centerlines from polygons
Building an indoor routing system in 3D
Calculating indoor route walk time
Chapter 9. Topology Checking and Data Validation
Creating a rule – only one point inside a polygon
A point must be on the starting and ending nodes of a line only
LineStrings must not overlap
A LineString must not have dangles
A polygon centroid must be within a specific distance of a line
Chapter 10. Visualizing Your Analysis
Generating a leaflet web map with Folium
Setting up TileStache to serve tiles
Visualizing DEM data with Three.js
Draping an orthophoto over a DEM
Chapter 11. Web Analysis with GeoDjango
Setting up a GeoDjango web application
Creating an indoor web routing service
Visualizing an indoor routing service
Creating an indoor route-type service
Creating an indoor route from room to room
Appendix A. Other Geospatial Python Libraries
Appendix B. Mapping Icon Libraries
Index