-
Notifications
You must be signed in to change notification settings - Fork 116
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
Clockwise fix #204
Clockwise fix #204
Conversation
Conflicts: src/vector_tile_geometry_decoder.ipp
@flippmoke - why are you not using |
@artemp it no longer does it in the same way as it is done in a streaming fashion as the geometry is decoded. Therefore, I can no longer use the same method. |
Current Master:
Pull Request:
|
@@ -248,61 +272,79 @@ void decode_linestring(mapnik::geometry::geometry<typename T::value_type> & geom | |||
{ | |||
geom = std::move(*itr); | |||
} | |||
else | |||
{ | |||
geom = std::move(mapnik::geometry::geometry_empty()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- What is the reasoning for additional
else
in general? E.g. why set to empty vs what was it before? - I think the
std::move
is useless here sincemapnik::geometry::geometry_empty()
is already a temporary and it can be justgeom = mapnik::geometry::geometry_empty();
/cc @artemp for confirmation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it actually is useless, in my mind I always wanted geom set in some manner in the code but then I remembered the default initialization for mapnik::geometry:geometry<>
is mapnik::geometry::geometry_empty
@flippmoke - this looks great, I think it is ready to 🚢 |
Fixed the way the decoder dealt with discarding interior and exterior rings when using bounding boxes. Also moved processing of vector tile area into vector tile coordinates so that clockwise and counterclockwise are more properly calculated.
/cc @springmeyer @jakepruitt