mapbox / mapbox/vt2geojson

Unexpected Geometry in Water Tile (13/4630/2102) – Includes Extra Detail Beyond Tile Extent

Open
#24 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
156
Forks
32
PR merge metrics
No merged PRs in 30d

Description

I am happily building using vector tiles provided by Mapbox and converting them to geojson, but I am encountering a weird issue. when I request a water tile, which should be a blank tile, i am getting an unexpected tile back.

For example the water tile at (13, 4630, 2102) fetched using https://api.mapbox.com/v4/mapbox.mapbox-streets-v8/${z}/${x}/${y}.mvt and converted to geojson results in the following GeoJSON:

{"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[23.554515838623047,65.5234908466135],[23.554515838623047,65.5130337046694],[23.423023223876953,65.5130337046694],[23.423023223876953,65.56747869944311],[23.554515838623047,65.56747869944311],[23.554515838623047,65.5295977989247],[23.543014526367188,65.52918004717498],[23.539581298828125,65.52676228858198],[23.545074462890625,65.52832674620896],[23.554344177246094,65.5273311931237],[23.554515838623047,65.52722896900354],[23.554515838623047,65.52551776662852],[23.548507690429688,65.52235285756382],[23.55297088623047,65.52221060544161],[23.554515838623047,65.5234908466135]],[[23.549880981445312,65.52718896815179],[23.54473114013672,65.52647783165708],[23.546104431152344,65.52505550049119],[23.542327880859375,65.52391757970713],[23.54747772216797,65.52420206455756],[23.546791076660156,65.5249132631082],[23.549537658691406,65.52576667577034],[23.55022430419922,65.52505550049119],[23.549880981445312,65.52718896815179]],[[23.540611267089844,65.52576667577034],[23.538894653320312,65.52434430581914],[23.540611267089844,65.52391757970713],[23.540611267089844,65.52576667577034]],[[23.53923797607422,65.52662006050738],[23.535804748535156,65.52505550049119],[23.537521362304688,65.52462878601511],[23.53923797607422,65.52662006050738]]]},"properties":{}}]}

Which is much more than the expected extent. I also don't think it is simply one zoom level higher because at level 12 the detail on the island wouldn't be as rough.

Image

Expected extent:
Image

For what I'm building this introduces issues when the rough detail overlaps the finer detail I get when actually requesting the tiles overlapping the island. Is this expected behavior, is this an issue with vt2geojson or with the source data, or is there a way to fix this?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the example request for tile 13/4630/2102 and comparing the returned geometry with the expected tile extent. Trace whether the extra geometry is present in the source vector tile or introduced during vt2geojson conversion; done means identifying the responsible side and documenting or correcting the behavior.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.