`--clip` leaves tiles outside the clip and cuts the wrong part of the sea along its edge (Planetiler tile reuse, onthegomap/planetiler#1710)

未关闭
#646 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
18/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
java, javascript

调研方向

Start from the basemaps build docs for --clip, --clip_buffer and --bounds, then reproduce on a regional extract at one of the named coordinates. The failure is in Planetiler's tile post-processing (its Clip.java), linked as onthegomap/planetiler#1710; confirm the workaround by pre-cutting the land and water polygons to the clip shape. Done is either a documented note warning about --clip with a clipped shape, or a basemaps-side workaround/test if maintainers choose one.

由索引模型根据 Issue 内容生成。

描述

Location
A tileset we build ourselves, clipped to Spain's land and territorial waters, so not on maps.protomaps.com (its builds are not clipped). West of El Hierro, Canary Islands: 27.75 N, 18.20 W at zoom 11 and 27.72 N, 18.32 W at zoom 13; off Huelva: 36.91 N, 6.81 W at zoom 12.

Screenshots
Before and after cutting the land and water polygons to the clip shape: land-colored blocks in the sea where tiles inside the clip were written with another tile's output.

hierro_z11 c1_hierro_z11

Required information

  • Browser: Chromium (Playwright 1.65.1, headless)
  • Renderer version: MapLibre GL JS 6.18.0
  • Tileset version and source: tiles/ at 42ffaaa (4.15.2), Planetiler 0.10.2, built with --clip=<shape.geojson> --clip_buffer=1 --bounds=<its box> over regional OSM extracts, with Overture's land and ocean polygons as --osm_land_path and --osm_water_path. Our build patches Clip.java in two ways (the buffer in pixels, and keeping only the parts of a feature's own kind); neither changes which tiles it keeps
  • Style JSON or NPM version: @protomaps/basemaps 5.7.2

Description
Planetiler writes a tile whose features equal the previous tile's with that tile's output, without calling postProcessTileFeatures for it (onthegomap/planetiler#1710). Clip is a tile post-processor whose result depends on the tile, so in runs of identical ocean fills a tile outside the clip shape took a kept tile's output (464,953 of 1,424,752 tiles were sea outside the clip, a strip as tall as the bounds), and tiles inside took an edge tile's cut (about 15,000 lost part of their sea, the holes in the screenshots).

Cutting the land and water polygons to the clip shape before the build avoids it: a tile on the clip's edge then holds a piece of polygon no other tile holds, and goes through Clip. Until Planetiler changes, the --clip docs could say so. Passing the clip shape to Planetiler's --polygon would keep tiles outside it from being drawn, but it is ignored when --bounds is also set (onthegomap/planetiler#1709) and does not help the tiles on the edge.

主要语言
Java
星标
779
派生
111
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

protomaps/basemaps 的其他 Issue

查看 protomaps/basemaps 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。