versatiles-org / versatiles-rs

VersaTiles - A toolbox for converting, checking and serving map tiles in various formats.
https://versatiles.org
MIT License
57 stars 2 forks source link

versatiles serve "data.versatiles#osm" feels wrong. Any other character than "#"? #5

Closed MichaelKreil closed 1 year ago

MichaelKreil commented 1 year ago

maybe use brackets like "../file/data.versatiles[osm]"

yetzt commented 1 year ago

use colon : .

MichaelKreil commented 1 year ago

But versatiles also accepts urls like "https://..." so colons are already in use :/

yetzt commented 1 year ago

ah, i see. then # fragments make sense in the url context, if you don't want to do some querytring shenanigans like ?[...]dataset=osm. there is not really a good way to have the same "refer to something within a file" functionality in file paths.

i think this is meant for distinguishing between multiple sources?

when in doubt, try to solve it via your arg parser, depending on it's capabilities <url|path> --name=osm or <name>=<url|path> or --name1 <name> --source1 <url|path>... or use the filename osm.versatiles becomes /tiles/osm/{z}/{x}/{y} and append integers in case of conflict.