Book description
Over 60 recipes to work with topology, overlays, indoor routing, and web application analysis with Python
About This Book
- Explore the practical process of using geospatial analysis to solve simple to complex problems with reusable recipes
- Concise step-by-step instructions to teach you about projections, vector, raster, overlay, indoor routing and topology analysis
- Create a basic indoor routing application with geodjango
Who This Book Is For
If you are a student, teacher, programmer, geospatial or IT administrator, GIS analyst, researcher, or scientist looking to do spatial analysis, then this book is for you. Anyone trying to answer simple to complex spatial analysis questions will get a working demonstration of the power of Python with real-world data. Some of you may be beginners with GIS, but most of you will probably have a basic understanding of geospatial analysis and programming.
What You Will Learn
- Discover the projection and coordinate system information of your data and learn how to transform that data into different projections
- Import or export your data into different data formats to prepare it for your application or spatial analysis
- Use the power of PostGIS with Python to take advantage of the powerful analysis functions
- Execute spatial analysis functions on vector data including clipping, spatial joins, measuring distances, areas, and combining data to new results
- Create your own set of topology rules to perform and ensure quality assurance rules in Python
- Find the shortest indoor path with network analysis functions in easy, extensible recipes revolving around all kinds of network analysis problems
- Visualize your data on a map using the visualization tools and methods available to create visually stunning results
- Build an indoor routing web application with GeoDjango to include your spatial analysis tools built from the previous recipes
In Detail
Geospatial development links your data to places on the Earth's surface. Its analysis is used in almost every industry to answer location type questions. Combined with the power of the Python programming language, which is becoming the de facto spatial scripting choice for developers and analysts worldwide, this technology will help you to solve real-world spatial problems.
This book begins by tackling the installation of the necessary software dependencies and libraries needed to perform spatial analysis with Python. From there, the next logical step is to prepare our data for analysis; we will do this by building up our tool box to deal with data preparation, transformations, and projections. Now that our data is ready for analysis, we will tackle the most common analysis methods for vector and raster data. To check or validate our results, we will explore how to use topology checks to ensure top-quality results. This is followed with network routing analysis focused on constructing indoor routes within buildings, over different levels.
Finally, we put several recipes together in a GeoDjango web application that demonstrates a working indoor routing spatial analysis application. The round trip will provide you all the pieces you need to accomplish your own spatial analysis application to suit your requirements.
Style and approach
Easy-to-follow, step-by-step recipes, explaining from start to finish how to accomplish real-world tasks.
Table of contents
-
Python Geospatial Analysis Cookbook
- Table of Contents
- Python Geospatial Analysis Cookbook
- Credits
- About the Author
- About the Reviewers
- www.PacktPub.com
- Preface
- 1. Setting Up Your Geospatial Python Environment
-
2. Working with Projections
- Introduction
- 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
-
3. Moving Spatial Data from One Format to Another
- Introduction
- 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
-
4. Working with PostGIS
- Introduction
- 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()
- 5. Vector Analysis
- 6. Overlay Analysis
- 7. Raster Analysis
-
8. Network Routing Analysis
- Introduction
- 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
- 9. Topology Checking and Data Validation
- 10. Visualizing Your Analysis
- 11. Web Analysis with GeoDjango
- A. Other Geospatial Python Libraries
- B. Mapping Icon Libraries
- Index
Product information
- Title: Python Geospatial Analysis Cookbook
- Author(s):
- Release date: November 2015
- Publisher(s): Packt Publishing
- ISBN: 9781783555079
You might also like
book
Learning Geospatial Analysis with Python
If you know Python and would like to use it for Geospatial Analysis this book is …
book
Mastering Geospatial Analysis with Python
Explore GIS processing and learn to work with various tools and libraries in Python. About This …
book
Learning Geospatial Analysis with Python - Third Edition
Learn the core concepts of geospatial data analysis for building actionable and insightful GIS applications Key …
book
QGIS Python Programming Cookbook - Second Edition
Master over 170 recipes that will help you turn QGIS from a desktop GIS tool into …