kylebarron / usgs-topo-tiler

Python package to read Web Mercator map tiles from USGS Historical Topographic Maps
https://kylebarron.dev/usgs-topo-mosaic
MIT License
77 stars 3 forks source link

Clip artifacts at low zoom #4

Open kylebarron opened 4 years ago

kylebarron commented 4 years ago

You could try math.ceil and math.floor instead of round here: https://github.com/kylebarron/usgs-topo-tiler/blob/b41a4f0134d3b1af2ae341481ef674e2932d4781/usgs_topo_tiler/usgs_topo.py#L49-L52

That would slightly overcompensate, but then the gaps would be white, instead of whatever the background color is. image

kylebarron commented 4 years ago

Helped with https://github.com/kylebarron/usgs-topo-tiler/commit/8cc581d854de81a6c78b4fac429a9998e5f877dd, which removed the rounding. But there's still some artifacts. I'm not sure I want to round up, since that could add white borders where the tile junction is even. For now this is fine.