Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Tweak labeling geometry logic for GEOS 3.9+ to give a massive speed
boost to labels in certain circumstances Specifically when only a portion of a large polygon is visible in the map extent and which participates in the labeling for the map then a HUGE amount of time was previously spent calculating the intersection of the polygon and the map extent. Now we shortcut this where we can, by: 1. Using the geos rectangle clipping method, which is very fast but can result in invalid geometries. We do this as a first-pass (and sometimes only pass) in order to quickly reduce the number of vertices we need to work with. 2. Rearranging the repair of geometries so we do it after the fast clipping, as the clipping algorithm isn't suspectible to invalid geometries and can itself create them 3. Only if needed (i.e. when the map extent isn't an axis-aligned rectangle) do we do the exact intersection of the polygon to the map extent
- Loading branch information