-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
optimized coordinate transform that skips proj4 failures #116
Comments
Writing unit tests for this in mapnik-vt I hit this unhandled condition: mapnik/mapnik#2901. It turns out that mapnik-vector-tile/src/vector_tile_strategy.hpp Lines 67 to 68 in 0c1dd16
-9223372036854775807 and this will trigger ClipperLib::AddPath to throw in RangeTest . So, finally we have a valid and likely way to reproduce #111
|
the valid range of mercator. Refs #116 This should fail currently: - Against mapnik before mapnik/mapnik#2901 this fails with: ``` due to unexpected exception with message: Coordinate outside allowed range: -9223372036854775808 -9223372036854775808 -9223372036854775808 -9223372036854775808 ``` - Against mapnik after mapnik/mapnik#2901 this fails with: ``` due to unexpected exception with message: Can't transformm geometry ```
9dd2729 adds the new transformer. Due to the ability to call
|
After f6fb9d4 we are now again handling pj_transform failures without throwing. The goal is not to perfectly represent shapes with coordinates outside the valid bounds - to do that robustly would require clipping before reprojecting. While we did that before it would now be inconvenient. So the key here is to perfectly represent shapes with 100% valid coords and therefore to:
As an example of what rendering a shape with invalid coords looks like see the following image (which is the testcase geometry visualized in studio a few ways):
|
Our vector tile processor here uses
boost::geometry::transform
and this strategy. The underlying strategy is sound howeverboost::geometry::transform
is not the right tool for the job because:!prj_trans_.backward()
)vector.reserve(size)
Therefore we need:
The text was updated successfully, but these errors were encountered: