Simplify
Sometimes, the exact detail is not necessary and a simpler version of a geometry object can be used to speed up computations. For our Interstates example, a line that follows a road precisely is probably not necessary for the use case. If the line is approximately close, it will work fine when a 1 km buffer is applied. The reduction in the complexity and size of the object can pay big dividends, especially in a parallelized big data environment. In that environment, the spatial objects could be held in memory on hundreds of nodes, so efficiency improvements can have a large impact.
Shapely provides the simplify method to reduce the size and complexity of a geometry object while retaining much of the original shape. The tolerance ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access