Muutke küpsiste eelistusi

Learning Geospatial Analysis with Python - 2nd Revised edition [Pehme köide]

  • Formaat: Paperback / softback, 394 pages, kõrgus x laius: 93x75 mm
  • Ilmumisaeg: 31-Dec-2015
  • Kirjastus: Packt Publishing Limited
  • ISBN-10: 1783552425
  • ISBN-13: 9781783552429
Teised raamatud teemal:
  • Formaat: Paperback / softback, 394 pages, kõrgus x laius: 93x75 mm
  • Ilmumisaeg: 31-Dec-2015
  • Kirjastus: Packt Publishing Limited
  • ISBN-10: 1783552425
  • ISBN-13: 9781783552429
Teised raamatud teemal:

An effective guide to geographic information systems and remote sensing analysis using Python 3

About 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 For

If 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 appreciated.

What 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 chasing

In Detail

Geospatial 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.

Preface ix
Chapter 1 Learning Geospatial Analysis with Python 1(48)
Geospatial analysis and our world
1(3)
Beyond disasters
4(1)
History of geospatial analysis
4(5)
Geographic information systems
9(2)
Remote sensing
11(6)
Elevation data
17(1)
Computer-aided drafting
18(1)
Geospatial analysis and computer programming
18(3)
Object-oriented programming for geospatial analysis
19(2)
Importance of geospatial analysis
21(1)
Geographic information system concepts
21(7)
Thematic maps
22(1)
Spatial databases
23(1)
Spatial indexing
24(1)
Metadata
24(1)
Map projections
24(2)
Rendering
26(1)
Remote sensing concepts
27(1)
Images as data
27(1)
Remote sensing and color
28(1)
Common vector GIS concepts
28(7)
Data structures
28(2)
Buffer
30(1)
Dissolve
30(1)
Generalize
31(1)
Intersection
32(1)
Merge
32(1)
Point in polygon
33(1)
Union
34(1)
Join
34(1)
Geospatial rules about polygons
35(1)
Common raster data concepts
35(3)
Band math
35(1)
Change detection
36(1)
Histogram
37(1)
Feature extraction
37(1)
Supervised classification
38(1)
Unsupervised classification
38(1)
Creating the simplest possible Python GIS
38(9)
Getting started with Python
38(1)
Building SimpleGIS
39(14)
Step by step
40(7)
Summary
47(2)
Chapter 2 Geospatial Data 49(28)
An overview of common data formats
49(4)
Data structures
53(1)
Common traits
53(1)
Geolocation
54(1)
Subject information
54(1)
Spatial indexing
54(3)
Indexing algorithms
54(3)
Quadtree index
55(1)
R-tree index
56(1)
Grids
57(1)
Overviews
57(1)
Metadata
58(1)
File structure
58(2)
Vector data
60(8)
Shapefiles
61(3)
CAD files
64(1)
Tag-based and markup-based formats
65(2)
GeoJSON
67(1)
Raster data
68(6)
TIFF files
69(1)
JPEG, GIF, BMP, and PNG
70(1)
Compressed formats
70(1)
ASCII Grids
70(1)
World files
71(3)
Point cloud data
74(1)
Web services
75(1)
Summary
76(1)
Chapter 3 The Geospatial Technology Landscape 77(38)
Data access
80(3)
GDAL
80(1)
OGR
81(2)
Computational geometry
83(16)
The PROJ.4 projection library
84(1)
CGAL
85(1)
JTS
86(2)
GEOS
88(1)
PostGIS
89(3)
Other spatially-enabled databases
92(5)
Oracle spatial and graph
93(2)
ArcSDE
95(2)
Microsoft SQL Server
97(1)
MySQL
97(1)
SpatiaLite
97(1)
Routing
98(1)
Esri Network Analyst and Spatial Analyst
98(1)
pgRouting
98(1)
Desktop tools (including visualization)
99(13)
Quantum GIS
100(2)
OpenEV
102(1)
GRASS GIS
103(1)
uDig
104(2)
gySIG
106(1)
OpenJUMP
106(1)
Google Earth
106(3)
NASA World Wind
109(1)
ArcG IS
110(2)
Metadata management
112(2)
GeoNetwork
112(1)
CatMDEdit
113(1)
Summary
114(1)
Chapter 4 Geospatial Python Toolbox 115(42)
Installing third-party Python modules
116(5)
Installing GDAL
118(3)
Windows
119(1)
Linux
120(1)
Mac OS X
120(1)
Python networking libraries for acquiring data
121(6)
The Python urllib module
121(2)
FTP
123(2)
ZIP and TAR files
125(2)
Python markup and tag-based parsers
127(10)
The minidom module
128(2)
ElementTree
130(5)
Building XML
131(4)
Well-known text (WKT)
135(2)
Python JSON libraries
137(2)
The json module
138(1)
The geojson module
139(1)
OGR
139(1)
PyShp
140(1)
dbfpy
141(1)
Shapely
142(1)
Fiona
143(2)
GDAL
145(1)
NumPy
146(2)
PIL
148(2)
PNGCanvas
150(2)
GeoPandas
152(1)
PyMySQL
153(1)
PyFPDF
154(1)
Spectral Python
155(1)
Summary
155(2)
Chapter 5 Python and Geographic Information Systems 157(46)
Measuring distance
158(9)
Pythagorean theorem
161(2)
Haversine formula
163(2)
Vincenty's formula
165(2)
Calculating line direction
167(1)
Coordinate conversion
168(2)
Reprojection
170(3)
Editing shapefiles
173(14)
Accessing the shapefile
175(1)
Reading shapefile attributes
176(3)
Reading shapefile geometry
179(1)
Changing a shapefile
180(2)
Adding fields
182(1)
Merging shapefiles
182(4)
Merging shapefiles with dbfpy
184(2)
Splitting shapefiles
186(1)
Subsetting spatially
186(1)
Performing selections
187(4)
Point in polygon formula
187(1)
Bounding Box Selections
188(1)
Attribute selections
189(2)
Creating images for visualization
191(1)
Dot density calculations
191(4)
Choropleth maps
195(2)
Using spreadsheets
197(2)
Using GPS data
199(1)
Geocoding
200(1)
Summary
201(2)
Chapter 6 Python and Remote Sensing 203(30)
Swapping image bands
204(3)
Creating histograms
207(7)
Performing a histogram stretch
211(3)
Clipping images
214(4)
Classifying images
218(4)
Extracting features from images
222(6)
Change detection
228(4)
Summary
232(1)
Chapter 7 Python and Elevation Data 233(32)
ASCII Grid files
233(4)
Reading grids
234(1)
Writing grids
235(2)
Creating a shaded relief
237(5)
Creating elevation contours
242(5)
Working with LIDAR
247(16)
Creating a grid from LIDAR
247(7)
Using PIL to visualize LIDAR
254(5)
Creating a triangulated irregular network
259(4)
Summary
263(2)
Chapter 8 Advanced Geospatial Python Modeling 265(44)
Creating a Normalized Difference Vegetative Index
266(12)
Setting up the framework
268(1)
Loading the data
269(1)
Rasterizing the shapefile
270(2)
Clipping the bands
272(1)
Using the NDVI formula
272(1)
Classifying the NDVI
273(5)
Additional functions
274(1)
Loading the NDVI
275(1)
Preparing the NDVI
275(1)
Creating classes
275(3)
Creating a flood inundation model
278(8)
The flood fill function
280(2)
Making a flood
282(4)
Creating a color hillshade
286(2)
Least cost path analysis
288(13)
Setting up the test grid
289(1)
The simple A* algorithm
290(1)
Generating the test path
291(1)
Viewing the test output
291(1)
The real-world example
292(9)
Loading the grid
294(1)
Defining the helper functions
295(1)
The real-world A* algorithm
296(2)
Generating a real-world path
298(3)
Routing along streets
301(3)
Geolocating photos
304(3)
Summary
307(2)
Chapter 9 Real-Time Data 309(24)
Tracking vehicles
310(2)
The NextBus agency list
312(1)
The NextBus route list
313(1)
NextBus vehicle locations
313(3)
Mapping NextBus locations
316(4)
Storm chasing
320(8)
Reports from the field
328(3)
Summary
331(2)
Chapter 10 Putting It All Together 333(26)
A typical GPS report
334(1)
Working with GPX-Reporter.py
334(1)
Stepping through the program
335(1)
The initial setup
336(2)
Working with utility functions
338(4)
Parsing the GPX
342(1)
Getting the bounding box
343(1)
Downloading map and elevation images
344(2)
Creating the hillshade
346(1)
Creating maps
347(4)
Measuring the elevation
351(1)
Measuring the distance
352(1)
Retrieving weather data
353(5)
Summary
358(1)
Index 359
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, both by Packt Publishing. His Python cookbook recipes were featured in two editions of Python Cookbook, O'Reilly Media. He is also the developer of the widely-used, open source Python Shapefile Library (PyShp). He maintains the geospatial technical blog http://geospatialpython.com/ and the Twitter feed, @SpatialPython, which discusses the use of the Python programming language in the geospatial industry. In 2011, Joel reverse-engineered and published the undocumented shapefile spatial indexing format and assisted fellow geospatial Python developer, Marc Pfister, in reversing the algorithm used, allowing developers around the world to create better-integrated and more robust geospatial applications. Joel serves as the lead architect, project manager, and co-developer for geospatial applications used by U.S. government agencies, including NASA, FEMA, NOAA, the U.S. Navy, and many other commercial and non-profit organizations. In 2002, he received the international Esri Special Achievement in GIS award for his work on the Real-Time Emergency Action Coordination Tool (REACT), for emergency management using geospatial analysis.