Python Geospatial Development, Second Edition
eBook - ePub

Python Geospatial Development, Second Edition

Erik Westra

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

Python Geospatial Development, Second Edition

Erik Westra

Book details
Book preview
Table of contents
Citations

About This Book

This is a tutorial style book that will teach usage of Python tools for GIS using simple practical examples and then show you how to build a complete mapping application from scratch. The book assumes basic knowledge of Python. No knowledge of Open Source GIS is required.Experienced Python developers who want to learn about geospatial concepts, work with geospatial data, solve spatial problems, and build map-based applications.This book will be useful those who want to get up to speed with Open Source GIS in order to build GIS applications or integrate Geo-Spatial features into their existing applications.

Frequently asked questions

How do I cancel my subscription?
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.
Can/how do I download books?
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.
What is the difference between the pricing plans?
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.
What is Perlego?
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.
Do you support text-to-speech?
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.
Is Python Geospatial Development, Second Edition an online PDF/ePUB?
Yes, you can access Python Geospatial Development, Second Edition by Erik Westra in PDF and/or ePUB format, as well as other popular books in Computer Science & Programming in Python. We have over one million books available in our catalogue for you to explore.

Information

Year
2013
ISBN
9781782161530
Edition
1

Python Geospatial Development

Second Edition


Table of Contents

Python Geospatial Development
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
Errata
Piracy
Questions
1. Geospatial Development Using Python
Python
Geospatial development
Applications of geospatial development
Analyzing geospatial data
Visualizing geospatial data
Creating a geospatial mash-up
Recent developments
Summary
2. GIS
Core GIS concepts
Location
Distance
Units
Projections
Cylindrical projections
Conic projections
Azimuthal projections
The nature of map projections
Coordinate systems
Datums
Shapes
GIS data formats
Working with GIS data manually
Summary
3. Python Libraries for Geospatial Development
Reading and writing geospatial data
GDAL/OGR
GDAL design
GDAL example code
OGR design
OGR example code
Documentation
Availability
Dealing with projections
pyproj
Design
Proj
Geod
Example code
Documentation
Availability
Analyzing and manipulating geospatial data
Shapely
Design
Example code
Documentation
Availability
Visualizing geospatial data
Mapnik
Design
Example code
Documentation
Availability
Summary
4. Sources of Geospatial Data
Sources of geospatial data in vector format
OpenStreetMap
Data format
Obtaining and using OpenStreetMap data
The OpenStreetMap API
Planet.osm
Mirror sites and extracts
Working with OpenStreetMap data
TIGER
Data format
Obtaining and using TIGER data
Natural Earth
Data format
Obtaining and using Natural Earth vector data
Global, self-consistent, hierarchical, high-resolution shoreline database (GSHHS)
Data format
Obtaining the GSHHS database
World Borders Dataset
Data format
Obtaining World Borders Dataset
Sources of geospatial data in raster format
Landsat
Data format
Obtaining Landsat imagery
Natural Earth
Data format
Obtaining and using Natural Earth raster data
Global Land One-kilometer Base Elevation (GLOBE)
Data format
Obtaining and using GLOBE data
National Elevation Dataset (NED)
Data format
Obtaining and using NED data
Sources of other types of geospatial data
GEOnet Names Server
Data format
Obtaining and using GEOnet Names Server data
Geographic Names Information System (GNIS)
Data format
Obtaining and using GNIS Data
Choosing your geospatial data source
Summary
5. Working with Geospatial Data in Python
Pre-requisites
Reading and writing geospatial data
Task – calculate the bounding box for each country in the world
Task – save the country bounding boxes into a shapefile
Task – analyze height data using a digital elevation map
Changing datums and projections
Task – change projections to combine shapefiles using geographic and UTM coordinates
Task – change datums to allow older and newer TIGER data to be combined
Representing and storing geospatial data
Task – define the border between Thailand and Myanmar
Task – save geometries into a text file
Performing geospatial calculations
Task – identify parks in or near urban areas
Converting and standardizing units of geometry and distance
Task – calculate the length of the Thai-Myanmar border
Task – find a point 132.7 kilometers west of Soshone, California
Exercises
Summary
6. GIS in the Database
Spatially-enabled databases
Spatial indexes
Open source spatially-enabled databases
MySQL
PostGIS
Installing and configuring PostGIS
Using PostGIS
Documentation
Advanced PostGIS features
SpatiaLite
Installing SpatiaLite
Installing pysqlite
Accessing SpatiaLite from Python
Documentation
Using SpatiaLite
SpatiaLite capabilities
Commercial Spatially-enabled databases
Oracle
MS SQL Server
Recommended best practices
Using the database to keep track of spatial references
Using the appropriate spatial reference for your data
Option 1 – using a database that supports geographies
Option 2 – transforming features as required
Option 3 – transforming features from the outset
When to use unprojected coordinates
Avoiding on-the-fly transformations within a query
Don't create geometries within a query
Using spatial indexes appropriately
Knowing the limits of your database's query optimizer
MySQL
PostGIS
SpatiaLite
Working with geospatial databases using python
Prerequisites
Working with MySQL
Working with PostGIS
Working with SpatiaLite
Comparing the databases
Summary
7. Working with Spatial Data
About DISTAL
Designing and building the database
Downloading the data
World Borders Dataset
GSHHS
GNIS
GEOnet Names Server
Importing the data
World Borders Dataset
GSHHS
US place name data
Worldwide place name data
Implementing the DISTAL application
The shared "database" module
The "select country" script
The "select area" script
Calculating the bounding box
Calculating the map's dimensions
Setting up the data source
Rendering the map image
The "show results" script
Identifying the clicked-on point
Identifying features by distance
Calculating distances manually
Using angular distances
Using projected coordinates
A hybrid approach
Displaying the results
Application review and improvements
Usability
Quality
Place name issues
Lat/Long coordinate problems
Performance
Finding the problem
Improving performance
Calculating the tiled shorelines
Using tiled shorelines
Analyzing the performance improvement
Summary
8. Using Python and Mapnik to Generate Maps
Introducing Mapnik
Creating an example map
Mapnik in depth
Data sources
Shapefile
PostGIS
Gdal
Ogr
SQLite
OSM
MemoryDatasource
Rules, filters, and styles
Filters
Scale denominators
"Else" rules
"Also" rules
Symbolizers
Drawing lines
LineSymbolizer
Line color
Line width
Opacity
Line caps
Line joins
Dashed and dotted lines
Drawing roads and other complex linear features
LinePatternSymbolizer
Drawing polygons
PolygonSymbolizer
Fill color
Opacity
Gamma correctio...

Table of contents

Citation styles for Python Geospatial Development, Second Edition

APA 6 Citation

Westra, E. (2013). Python Geospatial Development, Second Edition (1st ed.). Packt Publishing. Retrieved from https://www.perlego.com/book/390588/python-geospatial-development-second-edition-pdf (Original work published 2013)

Chicago Citation

Westra, Erik. (2013) 2013. Python Geospatial Development, Second Edition. 1st ed. Packt Publishing. https://www.perlego.com/book/390588/python-geospatial-development-second-edition-pdf.

Harvard Citation

Westra, E. (2013) Python Geospatial Development, Second Edition. 1st edn. Packt Publishing. Available at: https://www.perlego.com/book/390588/python-geospatial-development-second-edition-pdf (Accessed: 14 October 2022).

MLA 7 Citation

Westra, Erik. Python Geospatial Development, Second Edition. 1st ed. Packt Publishing, 2013. Web. 14 Oct. 2022.