Applying geometrical methods with Shapely

In a similar way to OGR, you can apply geometrical methods, using the polygon from the earlier example:

In:    print(p1.area)       print(p1.bounds)       print(p1.length)       print(p1.geom_type)Out:   22.0       (1.0, 2.0, 5.0, 9.0)       19.59524158061724       Polygon

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.