April 2018
Beginner to intermediate
440 pages
11h 36m
English
This example uses the Natural Earth Dataset introduced in Chapter 4, Data Types, Storage, and Conversion, under the Reading and writing vector data with GeoPandas section. We'll use latitude-longitude coordinates to create a spatial filter in the form of a bounding box. This box selects only the data inside of this box. This is a way to work with a subset of our data. We'll use OGR's SpatialFilterRec method, which takes four values—minx, miny, maxx and maxy, to create a bounding box. Our (random) example is to select the cities in our bounding box (which shows the state of Texas, as well as parts of Oklahoma and Mexico). To filter our results even further, we only want the cities in the US. This means ...