Skip to content
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

Mapbox Vector Tiles (MVT) data Not visible for point layer at lower zoom levels . #200

Open
divysts opened this issue Jan 4, 2024 · 1 comment

Comments

@divysts
Copy link

divysts commented Jan 4, 2024

I am using this POSTGIS function query to generate MVT tiles and visualize large point layer data. When zooming in these tiles starts appearing visually but leads to drastic changes in number of tiles visible at next zoom level.
This lead to reports of data inaccuracy. Tiles at lower zoom level are not returning any data even though there are millions of data in that bounding box.
1st image is when i try to see my map one zoom level up
2nd image is when i move my zoom level to one zoom level down

My query looks like this

      ST_AsMVT(tile, 'table', 4096, 'geom')
    FROM (
      SELECT
        ST_AsMVTGeom(
            ST_Transform(ST_CurveToLine("geometry"), 3857),
            ST_TileEnvelope($1::integer, $2::integer, $3::integer),
            4096, 64, true
        ) AS geom
        , "ogc_fid"
      FROM
        table
      WHERE
        "geometry" && ST_Transform(ST_TileEnvelope($1::integer, $2::integer, $3::integer, margin => 0.015625), 4326)
    ) AS tile

Image of map tiles one zoom level up

Image of map tiles one zoom level down(lower zoom level)

@divysts
Copy link
Author

divysts commented Jan 11, 2024

I found the solution tile_extent_increas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant