Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Geospatial Analysis with Python

You're reading from  Mastering Geospatial Analysis with Python

Product type Book
Published in Apr 2018
Publisher Packt
ISBN-13 9781788293334
Pages 440 pages
Edition 1st Edition
Languages
Authors (3):
Silas Toms Silas Toms
Profile icon Silas Toms
Paul Crickard Paul Crickard
Profile icon Paul Crickard
Eric van Rees Eric van Rees
Profile icon Eric van Rees
View More author details
Toc

Table of Contents (23) Chapters close

Title Page
Copyright and Credits
Packt Upsell
Contributors
Preface
1. Package Installation and Management 2. Introduction to Geospatial Code Libraries 3. Introduction to Geospatial Databases 4. Data Types, Storage, and Conversion 5. Vector Data Analysis 6. Raster Data Processing 7. Geoprocessing with Geodatabases 8. Automating QGIS Analysis 9. ArcGIS API for Python and ArcGIS Online 10. Geoprocessing with a GPU Database 11. Flask and GeoAlchemy2 12. GeoDjango 13. Geospatial REST API 14. Cloud Geodatabase Analysis and Visualization 15. Automating Cloud Cartography 16. Python Geoprocessing with Hadoop 1. Other Books You May Enjoy Index

Reading and writing vector data with OGR


Now, let's turn to OGR for reading and writing a vector so that you can compare both OGR and GeoPandas functionality for performing the same kind of tasks. To follow the instructions that are mentioned as we proceed, you can download the MTBS wildfire data from: https://edcintl.cr.usgs.gov/downloads/sciweb1/shared/MTBS_Fire/data/composite_data/fod_pt_shapefile/mtbs_fod_pts_data.zip and store them on your PC. The file that will be analyzed here is the mtbs_fod_pts_20170501 shapefile's attribute table, which has 20,340 rows and 30 columns.

We'll start with the ogrinfo command which works in a terminal window and can be used for describing vector data. These are not Python commands, but we'll include them here as you can easily run them in a Jupyter Notebook with a simple prefix (adding an exclamation mark before the used command). Take, for instance, the following command, which is similar to the Fiona driver command:

In: !ogrinfo –-formats

This command...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}