Summary
In this chapter we have looked at various techniques for using OGR, GDAL, Shapely, and pyproj
within Python programs to solve real-world problems. We have learned the following:
Reading and writing to vector-format geospatial data in shapefiles
Reading and analyzing raster-format geospatial data
Changing the datum and projection used by a shapefile
Using the Well-Known Text (WKT) format to represent geospatial features and spatial references in plain text
Using WKT to transfer geospatial data from one Python library to another
Using WKT to store geospatial data in plain text format
Using the Shapely library to perform various geospatial calculations on geometries, including distance calculations, dilation, and intersections.
Using the
pyproj.Proj
class to convert coordinates from one projection and datum to anotherUsing the
pyproj.Geod
class to convert from geometry coordinates to distances, and vice versa
Up to now, we have written programs that work directly with shapefiles and other data...