Certain output file formats will crop data on output so the MapCropper isn't necessary during the read operation, this used to just be OGR formats and now includes GeoJSON output files.
The MapCropper object deletes ways that fall outside of the bounds one-by-one using the RemoveWayByEid map visitor. When each way is deleted the OsmMap object rebuilds the _index member which is a costly operation. Instead of doing that, now the OsmMap::bulkRemoveWays method deletes a list of ways all at once and then rebuilds the index afterwards only one time.
Certain output file formats will crop data on output so the
MapCropper
isn't necessary during the read operation, this used to just be OGR formats and now includes GeoJSON output files.The
MapCropper
object deletes ways that fall outside of the bounds one-by-one using theRemoveWayByEid
map visitor. When each way is deleted theOsmMap
object rebuilds the_index
member which is a costly operation. Instead of doing that, now theOsmMap::bulkRemoveWays
method deletes a list of ways all at once and then rebuilds the index afterwards only one time.Closes #5693