Open mourner opened 8 years ago
@mourner - Cool, I was planning to add this issue as well :) My angle not so much GeoJSON but more generally boiler-plate code sharing across projects. Pretty much every project concerned with some geometries has custom bounding_box
implementation + operations.
Here is tested approach as a starting point : https://github.com/mapnik/mapnik/blob/master/include/mapnik/box2d.hpp /cc @jfirebaugh @springmeyer
Related: #25.
The GeoJSON spec defines an optional
bbox
property that can be present in any GeoJSON object (both geometries and feature).This is sometimes very useful, e.g. geojson-vt internal representation calculates bboxes to speed up clipping. I think we should add it to geometry.hpp too.
cc @artemp @jfirebaugh