openstreetmap / mod_tile

Renders map tiles with mapnik and serves them using apache
http://wiki.openstreetmap.org/wiki/Mod_tile
GNU General Public License v2.0
288 stars 191 forks source link

openstreetmap-tiles-update-expire and osm2pgsql 1.6.0 : --expire-tiles #292

Open esgn opened 2 years ago

esgn commented 2 years ago

Hi,

Stumbled upon this error in openstreetmap-tiles-update-expire with osm2pgsql

osm2pgsql version 1.6.0
ERROR: Minimum and maximum zoom level for tile expiry must be separated by '-'

-e$EXPIRY_METAZOOM:$EXPIRY_METAZOOM should be replaced by --expire-tiles "$EXPIRY_METAZOOM-$EXPIRY_METAZOOM" for the script to work with osm2pgsql 1.6.0

lonvia commented 2 years ago

That's funny. A colon was never an acceptable separator for osm2pgsql as far as I know. The main thing that has changed is that recent versions of osm2pgsql complain about the bad syntax.

SomeoneElseOSM commented 2 years ago

In addition to ^^ I suspect that relatively few people will actually use https://github.com/openstreetmap/mod_tile/blob/master/utils/openstreetmap-tiles-update-expire with osm2pgsql 1.6.0 , since osm2pgsql 1.4.2 or above fully supports osm2pgsql-replication and PyOsmium for replication, which doesn't require osmosis / Java.

Edit: Actually Debian 11 people wedded to the binaries in their distribution will be affected by this.

joto commented 2 years ago

In commits before 24488bfdaec2c432e33144ecb2688387253db37c the code was buggy and ignored everything after the colon if I see this correctly. Typical atoi() problem which ignores everything after the number. So this never worked correctly, because only the minzoom was set, not the maxzoom.

ldeffenb commented 2 years ago

In addition to ^^ I suspect that relatively few people will actually use https://github.com/openstreetmap/mod_tile/blob/master/utils/openstreetmap-tiles-update-expire with osm2pgsql 1.6.0 ,

Count me as one of the "few".