Skip to content

Ocean Layer Not Rendering at Low Zoom Levels in PMTiles (GeoServer)#47

Open
ronitjadhav wants to merge 1 commit intoshortbread-tiles:mainfrom
ronitjadhav:main
Open

Ocean Layer Not Rendering at Low Zoom Levels in PMTiles (GeoServer)#47
ronitjadhav wants to merge 1 commit intoshortbread-tiles:mainfrom
ronitjadhav:main

Conversation

@ronitjadhav
Copy link

@ronitjadhav ronitjadhav commented Feb 4, 2026

Problem

When serving PMTiles generated by shortbread-tilemaker through GeoServer using the PMTiles extension and MBStyle, ocean polygons do not render at zoom levels 0–7.

This happens because GeoServer relies on PMTiles layer metadata to decide which layers are available at a given zoom level.


Root Cause

In config.json:

  • The ocean layer is defined with:

    "minzoom": 8
    
  • The ocean-low layer covers zooms 0–7 and writes into ocean:

    "minzoom": 0,
    "maxzoom": 7,
    "write_to": "ocean"
    

While tilemaker correctly merges ocean-low geometries into the ocean layer at zooms 0–7, PMTiles metadata only reflects the primary layer definition, resulting in:

"ocean": { "minzoom": 8, "maxzoom": 14 }

GeoServer (via the PMTiles extension) therefore assumes the ocean layer does not exist below zoom 8 and does not render it, even though the tile data contains valid ocean polygons.


Solution

Update the ocean layer definition to match the actual data range after merging:

"ocean": {
-  "minzoom": 8,
+  "minzoom": 0,
   "maxzoom": 14,
   ...
}

This ensures PMTiles metadata correctly advertises ocean data at all zoom levels, allowing GeoServer + MBStyle to render it correctly.


Testing

  • Generated PMTiles for the Europe region

  • Verified metadata now reports:

    "ocean": { "minzoom": 0, "maxzoom": 14 }
    
  • Confirmed ocean renders correctly at low zoom levels in GeoServer using the PMTiles extension and MBStyle


Visual Comparison

Before After
Before After

@danduk82
Copy link

danduk82 commented Mar 9, 2026

👍 for this update

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

Successfully merging this pull request may close these issues.

2 participants