You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
osm2pgsql version 2.0.1
Build: None
Compiled using the following library versions:
Libosmium 2.20.0
Proj 9.5.1
Lua 5.3.6
What operating system and PostgreSQL/PostGIS version are you using?
ubuntu:25.04 on Docker
Tell us something about your system
Irrelevant
What did you do exactly?
Using PBF https://download.geofabrik.de/europe/cyprus-latest.osm.pbf to test around with a small dataset
Imported using flex style from examples: flex-config/public-transport.lua
Command osm2pgsql --create --slim --database postgresql://osmuser@db/osm --schema public --middle-schema public --output=flex --style=./public-transport.lua --log-progress=true ./data/cyprus-latest.osm.pbf
The database is running on docker using the postgis/postgis image.
What did you expect to happen?
Data to be imported without issues.
What did happen instead?
Encountered an error:
2025-01-16 16:08:21 osm2pgsql version 2.0.1
2025-01-16 16:08:22 Database version: 17.2 (Debian 17.2-1.pgdg110+1)
2025-01-16 16:08:22 PostGIS version: 3.5
2025-01-16 16:08:22 Initializing properties table '"public"."osm2pgsql_properties"'.
2025-01-16 16:08:22 Storing properties to table '"public"."osm2pgsql_properties"'.
2025-01-16 16:08:55 Reading input files done in 33s.
2025-01-16 16:08:55 Processed 4167670 nodes in 24s - 174k/s
2025-01-16 16:08:55 Processed 472207 ways in 6s - 79k/s
2025-01-16 16:08:55 Processed 8641 relations in 3s - 3k/s
2025-01-16 16:08:55 Reprocess marked nodes/ways (stage 2)...
2025-01-16 16:08:55 Creating id index on table 'lines'...
2025-01-16 16:08:55 Creating id indexes took 0s
2025-01-16 16:08:55 There are 676 nodes to reprocess...
2025-01-16 16:08:55 ERROR: Database format for tags invalid.
What did you do to try analyzing the problem?
Looked into the database.
All tags columns are of type jsonb
I was actually working on a different example that failed in the same way. Then I used the example and encountered the same issue.
I tried some other flex styles and they work as long as no 2nd stage is involved.
The text was updated successfully, but these errors were encountered:
Xyaren
changed the title
Example "public-transport.lua" failes with error: ERROR: Database format for tags invalid.
Example "public-transport.lua" fails with error: ERROR: Database format for tags invalid.
Jan 16, 2025
I checked this and you are right, this is a bug. Thanks for reporting this. Osm2pgsql sends the wrong database query and then doesn't understand the answer. This happens only in slim mode, when two-stage processing is used with node members of a relation. So the workaround for the moment is to use non-slim mode.
What version of osm2pgsql are you using?
osm2pgsql version 2.0.1
Build: None
Compiled using the following library versions:
Libosmium 2.20.0
Proj 9.5.1
Lua 5.3.6
What operating system and PostgreSQL/PostGIS version are you using?
ubuntu:25.04 on Docker
Tell us something about your system
Irrelevant
What did you do exactly?
Using PBF
https://download.geofabrik.de/europe/cyprus-latest.osm.pbf
to test around with a small datasetImported using flex style from examples: flex-config/public-transport.lua
Command
osm2pgsql --create --slim --database postgresql://osmuser@db/osm --schema public --middle-schema public --output=flex --style=./public-transport.lua --log-progress=true ./data/cyprus-latest.osm.pbf
The database is running on docker using the
postgis/postgis
image.What did you expect to happen?
Data to be imported without issues.
What did happen instead?
Encountered an error:
What did you do to try analyzing the problem?
Looked into the database.
All tags columns are of type
jsonb
I was actually working on a different example that failed in the same way. Then I used the example and encountered the same issue.
I tried some other flex styles and they work as long as no 2nd stage is involved.
The text was updated successfully, but these errors were encountered: