Comments (8)
Thanks, yes, this needs revisited. We are using only AGG-based clipping still which - by design - leads to the edges you see. Not a blocker if the tile is slightly buffered and they can be discarded out of sight but yes, certainly not ideal for the reasons you detail. The intended plan early on was to use Clipper or Boost.Geometry but we ran into blocking hangs and crashing bugs, respectively. However both toolkits have had a number of releases since so hopefully we can move to Clipper or Boost.Geometry in upcoming releases.
from mapnik-vector-tile.
Awesome, looking forward to it!
from mapnik-vector-tile.
@springmeyer btw, any idea of when you might try to approach this? Just wondering if it's worth spending a lot of effort trying to get around the degeneracies on the JS side, or would it be much easier to fix that on the VT side.
from mapnik-vector-tile.
@mourner - Definitely seems ideal to fix on the generation side. That said ideally i'd take a closer look at this not till end of sept/early oct - given other things in the pipeline.
from mapnik-vector-tile.
@springmeyer I was directed to this issue from the mapbox/vector-tile-js#14 issue. Is there any update?
from mapnik-vector-tile.
@mpickell high on the list of priorities so this will get attention soon, but I don't have an ETA yet.
from mapnik-vector-tile.
Update here:
degenerate edges
We have a plan to fix degenerate edges which is to move away from the agg clipper to a better clipping library (The AGG clipper leaves degenerate edges by design). Since we need to support complex/potentially non-simple and self-intersecting polygons we cannot use boost::geometry::intersection
. The clipping algorithm we choose also needs needs to maintain ring order (per #59 (comment) and mapnik/mapnik#2756). Therefore my sense of the best plan is to use the clipper library along with its custom clipper.PolyTree structure
To mitigate the performance hit of this new clipper, the plan is to simplify before clipping. To simplify before clipping the plan is to use boost::geometry::simplify
which is working in #94 but needs more of a robust framework to stand on which is being tracked at mapnik/mapnik#2753
invalid polygons
Polygons with degenerate/colinear eges or self-intersections before they arrive to Mapnik are going to be much harder to fix. My understand from talking with @mourner is that the latest earcut library (that we are targeting) is able to handle a variety of self-intersections. But we can consider using clipper SimplifyPolygon with StrictlySimple
. Once mapnik/mapnik#2753 is in place I'll be in a better place to test plugging in this type of geometry fixing to assess if it is viable (or too slow, not robust enough).
In the meantime anyone that has small testcases of invalid polygons you think should still be supported, please share them in the form of GeoJSON files.
from mapnik-vector-tile.
Done with VT2
from mapnik-vector-tile.
Related Issues (20)
- vector_tile.pb.h:12:2: error: #error This file was generated by a newer version of protoc HOT 34
- Reading openmaptiles's vector tiles using mapnik-vector-tile HOT 1
- Extents of Zero when decoding
- Features with different types but same value are stored together HOT 4
- Accessing Features in a layer
- Features dropping across tiles HOT 10
- Features dropping when creating tiles from GeoJSON containing GeometryCollections HOT 1
- Update build instructions for Ubuntu WSL
- [MVT] Query resolution based on 256 extent instead of vector_layer_extent HOT 12
- can support Mapnik3.1.0?
- Unable to build on MacOS HOT 3
- Strange Build Failure Building on Fedora 30 Docker Container Against Installed Mapnik HEAD HOT 3
- Unimplemented type: 4 while decoding tiles with japanese characters HOT 18
- `make: *** No rule to make target '../../src/vector_tile.pb.cc', needed by 'tileinfo'. Stop.` in examples/c++
- Failing test
- First test run executes less tests than subsequent runs
- make in example/c++ directory fails because file in src seems to have been renamed
- `fatal error: 'mapnik/geometry/box2d.hpp' file not found` HOT 3
- C lib alternative
- libmapnik3.1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mapnik-vector-tile.