mapbox / mapnik-vector-tile

Mapnik implemention of Mapbox Vector Tile specification
BSD 3-Clause "New" or "Revised" License
553 stars 117 forks source link

Clockwise fix #204

Closed flippmoke closed 8 years ago

flippmoke commented 8 years ago

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

artemp commented 8 years ago

@flippmoke - why are you not using mapnik::util::is_clockwise? We must stamp down on duplicate code as it's only encourages 🐛 's .

flippmoke commented 8 years ago

@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.

flippmoke commented 8 years ago

Current Master:

./build/Release/vtile-decode ./test/data/0.0.0.vector.mvt 0 0 0 100000
z:0 x:0 y:0 iterations:100000
message: gzip compressed
8313.71ms (cpu 8282.74ms)   | decode as datasource_pbf: ./test/data/0.0.0.vector.mvt
processed 800000 features

Pull Request:

./build/Release/vtile-decode ./test/data/0.0.0.vector.mvt 0 0 0 100000
z:0 x:0 y:0 iterations:100000
message: gzip compressed
7916.56ms (cpu 7883.13ms)   | decode as datasource_pbf: ./test/data/0.0.0.vector.mvt
processed 800000 features
springmeyer commented 8 years ago

@flippmoke - this looks great, I think it is ready to 🚢