The Shapely and Fiona libraries have been introduced in Chapter 2, Introduction to Geospatial Code Libraries, in the sections Shapely and Fiona. It makes sense to cover both of them together, as Shapely depends on other libraries for reading and writing files and Fiona fits the bill. As we'll see in the examples, we can use Fiona to open and read files and then pass geometry data to Shapely objects.
Shapely and Fiona
Shapely objects and classes
The Shapely library is used for creating and manipulating 2D vector data without the need for a spatial database. Not only does it do away with a database, it also does away with projections and data formats, focusing on geometry only. The strength of Shapely is that...