mapbox / mapbox/tippecanoe

Many geometry artifacts by converting geojson to mbtiles

Open
#895 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
3.1k
Forks
430
PR merge metrics
No merged PRs in 30d

Description

**Problem**
I'm trying to convert a polygonal dataset from geojson to mbtiles using tippecanoe.

The result has many artifacts and I cannot realize why.

My original data looks like so:
![Screenshot from 2020-12-21 18-22-14](https://user-images.githubusercontent.com/11291183/102804389-fc8c5c80-43b9-11eb-896c-a39fbb97384a.png)

But the converted data looks like so:
![Screenshot from 2020-12-21 18-29-52](https://user-images.githubusercontent.com/11291183/102804809-8d633800-43ba-11eb-8003-f96ed22ac3c9.png)

**The command I used:**
` tippecanoe -f -o out.mbtiles rooms2.geojson`

**My original dataset:**
`{
"type": "FeatureCollection",
"name": "rooms2",
"features": [
{ "type": "Feature", "properties": { "id": 6, "room_id": "004" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 8.403453283460099, 49.329157256303667 ], [ 8.403450990283577, 49.329159147126497 ], [ 8.403448132450007, 49.329157653894399 ], [ 8.403430593284723, 49.32917203729729 ], [ 8.40340417955095, 49.329193698476793 ], [ 8.403399404809266, 49.329197614108942 ], [ 8.403373400881929, 49.32921893918828 ], [ 8.40336067290861, 49.329229377027382 ], [ 8.403363534038247, 49.32923086756 ], [ 8.403359148600885, 49.329234463927854 ], [ 8.403356287471185, 49.329232973395158 ], [ 8.403354873515248, 49.329234132938517 ], [ 8.403329170726924, 49.329255211021085 ], [ 8.40332508765044, 49.329258559426933 ], [ 8.403299320605973, 49.3292796901762 ], [ 8.403269284732854, 49.329304321628399 ], [ 8.403267881577966, 49.329305472309748 ], [ 8.403270731016642, 49.329306956753278 ], [ 8.403266403308367, 49.329310505764724 ], [ 8.403263553869619, 49.329309021321052 ], [ 8.403203226914567, 49.329358493402836 ], [ 8.403206005001534, 49.329359923782285 ], [ 8.403202903289671, 49.329362467387149 ], [ 8.403260687641538, 49.329392219320731 ], [ 8.403233667919281, 49.329414377251382 ], [ 8.403173326560191, 49.329383308758722 ], [ 8.403018866187862, 49.329509680541427 ], [ 8.403021771252128, 49.32951119171554 ], [ 8.403019449696146, 49.329513097887514 ], [ 8.40311706036411, 49.32956387350697 ], [ 8.403136687258012, 49.329547758319713 ], [ 8.403142710888288, 49.329550891715932 ], [ 8.403151761386958, 49.329555599639363 ], [ 8.403181595959525, 49.329571262862736 ], [ 8.403190691198089, 49.329575850281039 ], [ 8.403211471350222, 49.329586659759137 ], [ 8.403212380490388, 49.329585913283957 ], [ 8.403220425338986, 49.329579307833015 ], [ 8.403223530155016, 49.329576758535183 ], [ 8.403248226403534, 49.329589531079122 ], [ 8.403252381222535, 49.329586123869859 ], [ 8.403278565480276, 49.32956467498159 ], [ 8.403328283128367, 49.329590303955996 ], [ 8.40333081408072, 49.329588239030016 ], [ 8.403355703857589, 49.329567827813619 ], [ 8.403352838375501, 49.329566335023401 ], [ 8.40335711377689, 49.329562828917425 ], [ 8.403359979258923, 49.329564321707544 ], [ 8.403403167302926, 49.329528904676458 ], [ 8.403414546807989, 49.329519572724102 ], [ 8.403419521103977, 49.32951549346847 ], [ 8.403430767883089, 49.329506270353569 ], [ 8.403448462348031, 49.329491759693646 ], [ 8.403445668446791, 49.32949029991925 ], [ 8.403449981595475, 49.329486762843594 ], [ 8.403452801314204, 49.329488236061408 ], [ 8.403513042960842, 49.329438833735807 ], [ 8.403510266895989, 49.329437387530461 ], [ 8.40351480675174, 49.329433664528928 ], [ 8.403517582816512, 49.32943511073416 ], [ 8.403520966111778, 49.329432336193129 ], [ 8.403532199026941, 49.329423124406361 ], [ 8.40353720699577, 49.329419017515455 ], [ 8.403548577372504, 49.329409692993785 ], [ 8.403605748532184, 49.329362808485364 ], [ 8.403602997431589, 49.329361375286688 ], [ 8.403607485302523, 49.329357694901326 ], [ 8.403610244659111, 49.329359132400945 ], [ 8.403620116408087, 49.329351025763685 ], [ 8.403642299808006, 49.329332833719185 ], [ 8.403649316814512, 49.329327079246141 ], [ 8.403659237442547, 49.329318943582052 ], [ 8.403676646499255, 49.329304666832392 ], [ 8.40369774228842, 49.329287366667167 ], [ 8.403695147283164, 49.329286010776727 ], [ 8.403697411763886, 49.329284162588799 ], [ 8.403577686062146, 49.329221598280974 ], [ 8.403575277565649, 49.329223564005574 ], [ 8.403569995260778, 49.329220803988001 ], [ 8.403572387542743, 49.329218851497281 ], [ 8.403453283460099, 49.329157256303667 ] ] ] } }
]
}
`

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the reported `tippecanoe -f -o out.mbtiles rooms2.geojson` conversion with the supplied GeoJSON and compare the resulting geometry with the screenshots. Investigate the conversion path responsible for polygon artifacts; done means identifying and correcting the artifact behavior and verifying the generated MBTiles output.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.