Python Geospatial Analysis Cookbook
eBook - ePub

Python Geospatial Analysis Cookbook

Michael Diener

Partager le livre
  1. 310 pages
  2. English
  3. ePUB (adapté aux mobiles)
  4. Disponible sur iOS et Android
eBook - ePub

Python Geospatial Analysis Cookbook

Michael Diener

DĂ©tails du livre
Aperçu du livre
Table des matiĂšres
Citations

À propos de ce livre

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.

Foire aux questions

Comment puis-je résilier mon abonnement ?
Il vous suffit de vous rendre dans la section compte dans paramĂštres et de cliquer sur « RĂ©silier l’abonnement ». C’est aussi simple que cela ! Une fois que vous aurez rĂ©siliĂ© votre abonnement, il restera actif pour le reste de la pĂ©riode pour laquelle vous avez payĂ©. DĂ©couvrez-en plus ici.
Puis-je / comment puis-je télécharger des livres ?
Pour le moment, tous nos livres en format ePub adaptĂ©s aux mobiles peuvent ĂȘtre tĂ©lĂ©chargĂ©s via l’application. La plupart de nos PDF sont Ă©galement disponibles en tĂ©lĂ©chargement et les autres seront tĂ©lĂ©chargeables trĂšs prochainement. DĂ©couvrez-en plus ici.
Quelle est la différence entre les formules tarifaires ?
Les deux abonnements vous donnent un accĂšs complet Ă  la bibliothĂšque et Ă  toutes les fonctionnalitĂ©s de Perlego. Les seules diffĂ©rences sont les tarifs ainsi que la pĂ©riode d’abonnement : avec l’abonnement annuel, vous Ă©conomiserez environ 30 % par rapport Ă  12 mois d’abonnement mensuel.
Qu’est-ce que Perlego ?
Nous sommes un service d’abonnement Ă  des ouvrages universitaires en ligne, oĂč vous pouvez accĂ©der Ă  toute une bibliothĂšque pour un prix infĂ©rieur Ă  celui d’un seul livre par mois. Avec plus d’un million de livres sur plus de 1 000 sujets, nous avons ce qu’il vous faut ! DĂ©couvrez-en plus ici.
Prenez-vous en charge la synthÚse vocale ?
Recherchez le symbole Écouter sur votre prochain livre pour voir si vous pouvez l’écouter. L’outil Écouter lit le texte Ă  haute voix pour vous, en surlignant le passage qui est en cours de lecture. Vous pouvez le mettre sur pause, l’accĂ©lĂ©rer ou le ralentir. DĂ©couvrez-en plus ici.
Est-ce que Python Geospatial Analysis Cookbook est un PDF/ePUB en ligne ?
Oui, vous pouvez accĂ©der Ă  Python Geospatial Analysis Cookbook par Michael Diener en format PDF et/ou ePUB ainsi qu’à d’autres livres populaires dans Computer Science et Programming in Python. Nous disposons de plus d’un million d’ouvrages Ă  dĂ©couvrir dans notre catalogue.

Informations

Année
2015
ISBN
9781783555079

Python Geospatial Analysis Cookbook


Table of Contents

Python Geospatial Analysis Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Sections
Getting ready
How to do it

How it works

There's more

See also
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Setting Up Your Geospatial Python Environment
Introduction
Installing virtualenv and virtualenvwrapper
Getting ready
How to do it...
How it works...
There's more

Installing pyproj and NumPy
Getting ready
How to do it...
How it works...
Installing shapely, matplotlib, and descartes
Getting ready
How to do it...
How it works...
Installing pyshp, geojson, and pandas
Getting ready
How to do it...
How it works...
Installing SciPy, PySAL, and IPython
Getting ready
How to do it...
How it works...
Installing GDAL and OGR
Getting ready
How to do it...
How it works...
See also
Installing GeoDjango and PostgreSQL with PostGIS
Getting ready
How to do it...
How it works...
There's more...
2. Working with Projections
Introduction
Discovering projection(s) of a Shapefile or GeoJSON dataset
Getting ready
How to do it...
How it works...
There's more...
See also
Listing projection(s) from a WMS server
Getting ready
How to do it...
How it works...
Creating a projection definition for a Shapefile if it does not exist
Getting ready
How to do it...
How it works...
Batch setting the projection definition of a folder full of Shapefiles
How to do it...
How it works...
Reprojecting a Shapefile from one projection to another
How to do it...
How it works...
See also
3. Moving Spatial Data from One Format to Another
Introduction
Converting a Shapefile to a PostGIS table using ogr2ogr
Getting ready
How to do it...
How it works...
See also
Batch importing a folder of Shapefiles into PostGIS using ogr2ogr
How to do it...
How it works...
There's more

Batch exporting a list of tables from PostGIS to Shapefiles
How to do it...
How it works...
There's more...
Converting an OpenStreetMap (OSM) XML to a Shapefile
Getting ready
How to do it...
How it works...
Converting a Shapefile (vector) to a GeoTiff (raster)
Getting ready
How to do it...
How it works...
See also
Converting a raster (GeoTiff) to a vector (Shapefile) using GDAL
Getting ready
How to do it...
How it works...
Creating a Shapefile from point data stored in Microsoft Excel
Getting ready
How to do it...
How it works...
Converting an ESRI ASCII DEM to an image height map
Getting ready
How to do it...
How it works...
4. Working with PostGIS
Introduction
Executing a PostGIS ST_Buffer analysis query and exporting it to GeoJSON
Getting ready
How to do it...
How it works...
Finding out whether a point is inside a polygon
Getting ready
How to do it...
How it works...
There's more...
Splitting LineStrings at intersections using ST_Node
Getting ready
How to do it...
How it works...
Checking the validity of LineStrings
How to do it...
Executing a spatial join and assigning point attributes to a polygon
Getting ready
How to do it...
How it works...
Conducting a complex spatial analysis query using ST_Distance()
Getting ready
How to do it...
How it works...
5. Vector Analysis
Introduction
Clipping LineStrings to an area of interest
Getting ready
How to do it...
How it works...
Splitting polygons with lines
Getting ready
How to do it...
How it works...
Finding the location of a point on a line using linear referencing
How to do it...
How it works...
See also
Snapping a point to the nearest line
How to do it...
How it works...
Calculating 3D ground distance and total elevation gain
Getting ready
How to do it...
How it works...
There's more...
6. Overlay Analysis
Introduction
Punching holes in polygons with a symmetric difference operation
Getting ready
How to do it...
How it works...
Union polygons without merging
Getting ready
How to do it...
How it works...
Union polygons with merging (dissolving)
Getting ready
How to do it...
How it works...
Performing an identity function (difference + intersection)
How to do it...
How it works...
7. Raster Analysis
Introduction
Loading a DEM USGS ACSII CDED into PostGIS
Getting ready
How to do it...
How it works...
Creating an elevation profile
Getting ready
How to do it...
How it works...
Creating a hillshade raster from your DEM with ogr
Getting ready
How to do it...
How it works...
Generating slope and aspect images from your DEM
Getting ready
How to do it...
How it works...
Merging rasters to generate a color relief map
Getting ready
How to do it...
How it works...
8. Network Routing Analysis
Introduction
Finding the Dijkstra shortest path with pgRouting
Getting ready
How to do it...
How it works...
Finding the Dijkstra shortest path with NetworkX in pure Python
Getting ready
How to do it...
How it works...
Generating evacuation polygons based on an indoor shortest path
Getting ready
How to do it...
How it works...
Creating centerlines from polygons
Getting ready
How to do it...
How it works...
Building an indoor routing system in 3D
Getting ready
How to do it...
How it works...
Calculating indoor route walk time
How to do it...
How it works...
9. Topology Checking and Data Validation
Introduction
Creating a rule – only one point inside a polygon
Getting ready
How to do it...
How it works...
A point must be on the starting and ending nodes of a line only
How to do it...
How it works...
LineStrings must not overlap
How to do it...
How it works...
A LineString must not have dangles
How to do it...
How it works...
A polygon centroid must be within a specific distance of a line
How to do it...
How it works...
10. Visualizing Your Analysis
Introduction
Generating a leaflet web map with Folium
Getting ready
How to do it...
How it works...
Setting up TileStache to serve tiles
Getting ready
How to do it...
Visualizing DEM data with Three.js
Getting ready
How to do it...
How it works...
Draping an orthophoto over a DEM
Getting ready
How to do it...
How it works...
11. Web Analysis with GeoDjango
Introduc...

Table des matiĂšres