Updated BoundsClipping (markdown)

ThomasG77 2011-12-09 14:46:46 -08:00
parent f0c2bd0e2b
commit f5b20bbf90

@ -11,32 +11,34 @@ Clipping is used primarily to ensure `valid` and appropriate coordinate bounds a
Clipping can interact in subtle and important ways with a variety of other map and layer level parameters, and became more error prone (but powerful) with the introduction of support for Proj4 in r330. Clipping can interact in subtle and important ways with a variety of other map and layer level parameters, and became more error prone (but powerful) with the introduction of support for Proj4 in r330.
Tickets related to bounding box clipping over time include: Tickets related to bounding box clipping over time include:
* #127 - BBox clipping fails when there's no intersection
* #204 - map.buffer_size() does not seem to fetch data within buffer zone * #127 - BBox clipping fails when there's no intersection
* #308 - Mapnik bug when features with invalid coordinates for target projection are encountered * #204 - map.buffer_size() does not seem to fetch data within buffer zone
* #402 - Some points from PointDatasource get lost on reprojection * #308 - Mapnik bug when features with invalid coordinates for target projection are encountered
* #486 - Bounds clipping likely to fail if using map_buffer after r1348 * #402 - Some points from PointDatasource get lost on reprojection
* #506 - Add a Map level custom extent or max_extent to enhance clipping ability * #486 - Bounds clipping likely to fail if using map_buffer after r1348
* #548 - Layer query bbox not correct on Lambert Map * #506 - Add a Map level custom extent or max_extent to enhance clipping ability
* #549 - Problem with local projections and worldwide data extent * #548 - Layer query bbox not correct on Lambert Map
* #751 - Better handling of bounding box transform (avoids need for 'maximum-extent'). * #549 - Problem with local projections and worldwide data extent
* #751 - Better handling of bounding box transform (avoids need for 'maximum-extent').
Key Changesets include: Key Changesets include:
* r522 - initial impl of clipping in feature_style_processor.hpp
* r770 - conditional use of proj_transform and clipping * r522 - initial impl of clipping in feature_style_processor.hpp
* r789 - Check for layer intersection * r770 - conditional use of proj_transform and clipping
* r851 - ensure clipping always happens against layer extent * r789 - Check for layer intersection
* r853 - switched to use the buffered map extent (map bbox + map.buffer_size) * r851 - ensure clipping always happens against layer extent
* r1348 - changed bounds clipping to buffered map extent, created #486 * r853 - switched to use the buffered map extent (map bbox + map.buffer_size)
* r2776 - added maximum-extent attribute to map (#506) * r1348 - changed bounds clipping to buffered map extent, created #486
* r2782 - if maximum-extent is provided, clip map query to it (#506), which provides one potential, performant, solution to #549 * r2776 - added maximum-extent attribute to map (#506)
* r2784 - *switch* to first attempt to clip and intersect against map extent, then falling back to layer extent * r2782 - if maximum-extent is provided, clip map query to it (#506), which provides one potential, performant, solution to #549
* The fallback to layer clipping should now be rarely needed except where a map buffer pushes potential map extent outside of valid bounds but this can now be solved by supplying 'maximum-extent' (#506) * r2784 - *switch* to first attempt to clip and intersect against map extent, then falling back to layer extent
* r2785 - skip rendering specific coordinates which cannot be back projected from the layer srs into the map srs, avoiding the previous outcome of full skipping of features (this is at the cost of potentially odd looking polygons, but should not impact performance) * The fallback to layer clipping should now be rarely needed except where a map buffer pushes potential map extent outside of valid bounds but this can now be solved by supplying 'maximum-extent' (#506)
* r3048 - fixed bug in fallback intersection checking that lead to false positive and uneeded clip * r2785 - skip rendering specific coordinates which cannot be back projected from the layer srs into the map srs, avoiding the previous outcome of full skipping of features (this is at the cost of potentially odd looking polygons, but should not impact performance)
* r3048 - fixed bug in fallback intersection checking that lead to false positive and uneeded clip
IRC discussions: IRC discussions:
Discussion of fixing clipping after addition of map_buffer to avoid truncated text at tile edges: Discussion of fixing clipping after addition of map_buffer to avoid truncated text at tile edges:
* http://mapnik.dbsgeo.com/mapnik_logs/2009/02/01/ - prediction of #486 * http://mapnik.dbsgeo.com/mapnik_logs/2009/02/01/ - prediction of #486