[Tile-serving] [osm2pgsql-dev/osm2pgsql] Out of bounds tile coordinates produced (Issue #2142)

Paul Norman notifications at github.com
Mon Mar 4 18:43:07 UTC 2024


<!-- Please don't use screenshots. Copy and paste the *text* output here if that's needed for context. -->

## What version of osm2pgsql are you using?

2024-03-04 18:37:49  osm2pgsql version 1.11.0 (1.11.0)
Build: RelWithDebInfo
Compiled using the following library versions:
Libosmium 2.20.0
Proj [API 6] 9.1.1
Lua 5.3.6

## What did you do exactly?

When running my update script I got an error with a tile coordinate not between 0 and 2^z-1.

```sh
#!/bin/bash
set -e
while :
do
date
SEQUENCE=$(osm2pgsql-replication status -d flex --json | jq '.local.sequence')
LUA_PATH="$HOME/osm2pgsql-themepark/lua/?.lua;;" osm2pgsql-replication update -d flex --once -- --expire-tiles=10-14 -o "expire_files/$SEQUENCE.txt"
cat  "expire_files/$SEQUENCE.txt" | tilekiln/bin/tilekiln generate tiles --source-dbname flex --storage-dbname tiles --config shortbread.yaml -n1
sleep 60
done
```

Upon inspection, SEQUENCE=5986020 and the last lines of the file are
```
14/701/16384
13/350/8192
12/175/4096
11/87/2048
10/43/1024
```
These appear to be the only tiles out of bounds.

The in-DB metadata is

```
flex=# select * from osm2pgsql_properties ;
          property           |                        value
-----------------------------+-----------------------------------------------------
 attributes                  | false
 db_format                   | 2
 flat_node_file              | /home/pnorman/spirit/nodes.bin
 import_timestamp            | 2024-02-12T01:00:00Z
 output                      | flex
 prefix                      | planet_osm
 style                       | /home/pnorman/spirit/shortbread.lua
 updatable                   | true
 version                     | 1.11.0
 current_timestamp           | 2024-03-02T01:01:57Z
 replication_base_url        | https://planet.openstreetmap.org/replication/minute
 replication_sequence_number | 5986023
 replication_timestamp       | 2024-03-02T01:01:57Z
(13 rows)
```

This means that the diff that causes the problem is > 5986020 and <= 5986023. I have not yet inspected the diffs.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/osm2pgsql-dev/osm2pgsql/issues/2142
You are receiving this because you are subscribed to this thread.

Message ID: <osm2pgsql-dev/osm2pgsql/issues/2142 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20240304/54c31da7/attachment-0001.htm>


More information about the Tile-serving mailing list