Learning Geospatial Analysis with Python - Second Edition
eBook - ePub

Learning Geospatial Analysis with Python - Second Edition

  1. 394 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Learning Geospatial Analysis with Python - Second Edition

Book details
Book preview
Table of contents
Citations

About This Book

An effective guide to geographic information systems and remote sensing analysis using Python 3About This Book• Construct applications for GIS development by exploiting Python• This focuses on built-in Python modules and libraries compatible with the Python Packaging Index distribution system—no compiling of C libraries necessary• This practical, hands-on tutorial teaches you all about Geospatial analysis in Python Who This Book Is ForIf you are a Python developer, researcher, or analyst who wants to perform Geospatial, modeling, and GIS analysis with Python, then this book is for you. Familarity with digital mapping and analysis using Python or another scripting language for automation or crunching data manually is appreciatedWhat You Will Learn• Automate Geospatial analysis workflows using Python• Code the simplest possible GIS in 60 lines of Python• Mold thematic maps with Python tools• Get hold of the various forms that geospatial data comes in• Produce elevation contours using Python tools• Create flood inundation models• Apply Geospatial analysis to find out about real-time data tracking and for storm chasingIn DetailGeospatial Analysis is used in almost every field you can think of from medicine, to defense, to farming. This book will guide you gently into this exciting and complex field. It walks you through the building blocks of geospatial analysis and how to apply them to influence decision making using the latest Python software.Learning Geospatial Analysis with Python, 2nd Edition uses the expressive and powerful Python 3 programming language to guide you through geographic information systems, remote sensing, topography, and more, while providing a framework for you to approach geospatial analysis effectively, but on your own terms. We start by giving you a little background on the field, and a survey of the techniques and technology used. We then split the field into its component specialty areas: GIS, remote sensing, elevation data, advanced modeling, and real-time data.This book will teach you everything you need to know about, Geospatial Analysis from using a particular software package or API to using generic algorithms that can be applied. This book focuses on pure Python whenever possible to minimize compiling platform-dependent binaries, so that you don't become bogged down in just getting ready to do analysis. This book will round out your technical library through handy recipes that will give you a good understanding of a field that supplements many a modern day human endeavors.Style and approach This is a practical, hands-on tutorial that teaches you all about Geospatial analysis interactively using Python.

Frequently asked questions

Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes, you can access Learning Geospatial Analysis with Python - Second Edition by Joel Lawhead in PDF and/or ePUB format, as well as other popular books in Informatica & Programmazione in Python. We have over one million books available in our catalogue for you to explore.

Information

Year
2015
ISBN
9781785281419

Learning Geospatial Analysis with Python Second Edition


Table of Contents

Learning Geospatial Analysis with Python Second Edition
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
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Learning Geospatial Analysis with Python
Geospatial analysis and our world
Beyond disasters
History of geospatial analysis
Geographic information systems
Remote sensing
Elevation data
Computer-aided drafting
Geospatial analysis and computer programming
Object-oriented programming for geospatial analysis
Importance of geospatial analysis
Geographic information system concepts
Thematic maps
Spatial databases
Spatial indexing
Metadata
Map projections
Rendering
Remote sensing concepts
Images as data
Remote sensing and color
Common vector GIS concepts
Data structures
Buffer
Dissolve
Generalize
Intersection
Merge
Point in polygon
Union
Join
Geospatial rules about polygons
Common raster data concepts
Band math
Change detection
Histogram
Feature extraction
Supervised classification
Unsupervised classification
Creating the simplest possible Python GIS
Getting started with Python
Building SimpleGIS
Step by step
Summary
2. Geospatial Data
An overview of common data formats
Data structures
Common traits
Geolocation
Subject information
Spatial indexing
Indexing algorithms
Quadtree index
R-tree index
Grids
Overviews
Metadata
File structure
Vector data
Shapefiles
CAD files
Tag-based and markup-based formats
GeoJSON
Raster data
TIFF files
JPEG, GIF, BMP, and PNG
Compressed formats
ASCII Grids
World files
Point cloud data
Web services
Summary
3. The Geospatial Technology Landscape
Data access
GDAL
OGR
Computational geometry
The PROJ.4 projection library
CGAL
JTS
GEOS
PostGIS
Other spatially-enabled databases
Oracle spatial and graph
ArcSDE
Microsoft SQL Server
MySQL
SpatiaLite
Routing
Esri Network Analyst and Spatial Analyst
pgRouting
Desktop tools (including visualization)
Quantum GIS
OpenEV
GRASS GIS
uDig
gvSIG
OpenJUMP
Google Earth
NASA World Wind
ArcGIS
Metadata management
GeoNetwork
CatMDEdit
Summary
4. Geospatial Python Toolbox
Installing third-party Python modules
Installing GDAL
Windows
Linux
Mac OS X
Python networking libraries for acquiring data
The Python urllib module
FTP
ZIP and TAR files
Python markup and tag-based parsers
The minidom module
ElementTree
Building XML
Well-known text (WKT)
Python JSON libraries
The json module
The geojson module
OGR
PyShp
dbfpy
Shapely
Fiona
GDAL
NumPy
PIL
PNGCanvas
GeoPandas
PyMySQL
PyFPDF
Spectral Python
Summary
5. Python and Geographic Information Systems
Measuring distance
Pythagorean theorem
Haversine formula
Vincenty's formula
Calculating line direction
Coordinate conversion
Reprojection
Editing shapefiles
Accessing the shapefile
Reading shapefile attributes
Reading shapefile geometry
Changing a shapefile
Adding fields
Merging shapefiles
Merging shapefiles with dbfpy
Splitting shapefiles
Subsetting spatially
Performing selections
Point in polygon formula
Bounding Box Selections
Attribute selections
Creating images for visualization
Dot density calculations
Choropleth maps
Using spreadsheets
Using GPS data
Geocoding
Summary
6. Python and Remote Sensing
Swapping image bands
Creating histograms
Performing a histogram stretch
Clipping images
Classifying images
Extracting features from images
Change detection
Summary
7. Python and Elevation Data
ASCII Grid files
Reading grids
Writing grids
Creating a shaded relief
Creating elevation contours
Working with LIDAR
Creating a grid from LIDAR
Using PIL to visualize LIDAR
Creating a triangulated irregular network
Summary
8. Advanced Geospatial Python Modeling
Creating a Normalized Difference Vegetative Index
Setting up the framework
Loading the data
Rasterizing the shapefile
Clipping the bands
Using the NDVI formula
Classifying the NDVI
Additional functions
Loading the NDVI
Preparing the NDVI
Creating classes
Creating a flood inundation model
The flood fill function
Making a flood
Creating a color hillshade
Least cost path analysis
Setting up the test grid
The simple A* algorithm
Generating the test path
Viewing the test output
The real-world example
Loading the grid
Defining the helper functions
The real-world A* algorithm
Generating a real-world path
Routing along streets
Geolocating photos
Summary
9. Real-Time Data
Tracking vehicles
The NextBus agency list
The NextBus route list
NextBus vehicle locations
Mapping NextBus locations
Storm chasing
Reports from the field
Summary
10. Putting It All Together
A typical GPS report
Working with GPX-Reporter.py
Stepping through the program
The initial setup
Working with utility functions
Parsing the GPX
Getting the bounding box
Downloading map and elevation images
Creating the hillshade
Creating maps
Measuring the elevation
Measuring the distance
Retrieving weather data
Summary
Index

Learning Geospatial Analysis with Python Second Edition

Copyright © 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: October 2013
Second edition: December 2015
Production reference: 1211215
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78355-242-9
www.packtpub.com

Credits

Author
Joel Lawhead
Reviewers
Mark Cederholm
Truc Viet Le
John Maurer
Julia Wood
Commissioning Editor
Kartikey Pandey
Acquisition Editors
Kevin Colaco
Usha Iyer
Kartikey Pandey
Content Development Editor
Anish Sukumaran
Technical Editor
Manthan Raja
Copy Editor
Tasneem Fatehi
Project Coordinator
Izzat Contractor
Proofreader
Safis Editing
Indexer
Mariammal Chettiyar
Graphics
Jason Monteiro
Production Coordinator
Arvindkumar Gupta
Cover Work
Arvindkumar Gupta

About the Author

Joel Lawhead is a project management institute-certified Project Management Professional (PMP), certified GIS Professional (GISP), and the Chief Information Officer (CIO) of NVision Solutions Inc., an award-winning firm that specializes in geospatial technology integration and sensor engineering.
Joel began using Python in 1997 and started combining it with geospatial software development in 2000. He is the author of the first edition of Learning Geospatial Analysis with Python and QGIS Python Programming Cookbook, ...

Table of contents

  1. Learning Geospatial Analysis with Python Second Edition