onthegomap/planetiler

[FEATURE] Log planet version being used

Closed this issue · 2 comments

Is your feature request related to a problem? Please describe.
There is no way to know what version of a planet file is being used for a given generation.

Describe the solution you'd like
Look up the planet version from https://osm-pds.s3.amazonaws.com/ and log it.

Additional context
One way to do this:

  1. On https://osm-pds.s3.amazonaws.com/ :
  2. Checking the ETag of planet-latest.osm.pbf, currently it's:
<Key>planet-latest.osm.pbf</Key>
<ETag>"72b0a0f0a6a6fa5da583a9e91f939ec4-9221"</ETag>
  1. Finding the other file with the same ETag, currently it's:
<Key>2023/planet-231211.osm.pbf</Key>
<ETag>"72b0a0f0a6a6fa5da583a9e91f939ec4-9221"</ETag>

So the current version is 2023/history-231211.osm.pbf. Maybe there is a better way, but this one is guaranteed to get the version which matches the downloaded planet-latest file.

Planetiler adds some extra attributes to the tileset metadata, including planetiler:osm:osmosisreplicationtime that has the osmosis_replication_timestamp value from the header of the input OSM source file. Would that work?

I checked the latest run and this is what it says:

"planetiler:osm:osmosisreplicationtime": "2023-12-11T00:59:58Z",

While not perfect, I think this should be good enough to identify the file being used.