Open yarray opened 2 years ago
Had a quick look at the data and seems to be a reprojection problem. When I reproject manually from EPSG:4326 (WGS 84) to EPSG:3857 (Web Mercator), the tiles look fine.
ogr2ogr -t_srs EPSG:3857 poly3857.shp ./large_polygon.shp
@pka Thanks for your help! I can confirm that supplying data with EPSG:3857 works. But is my config correct for 4326 data? It is still a bug I guess?
Your configuration looks correct and automatic reprojection should give the same result. Will look into it.
I tried multiple sources including Natural Earth, UIA, etc., with both shapefile and postgis as datasources. However, although I could see some lines/polygons sometimes, it seemed that the tiles were always incorrect. To illustrate the problem, I created two datasets of polygons.
The first one contained several large polygons, like:
I then generated config with
./t_rex genconfig --datasource <path>/large_polygon.shp > config.test.toml
and then served the tileset with
RUST_LOG=debug ./t_rex serve -c config.dresden.toml
In the Xray tab:
The log printed "1 features" for some tiles. It also occasionally printed "ERROR 1: latitude or longitude exceeded limits". I'm not sure whether it's related to the final output.
The corresponding config was:
The input shapefile was large_polygon.zip.