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

Get Mastering Geospatial Analysis with Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.