[Tile-serving] [osm2pgsql-dev/osm2pgsql] Fix two-stage processing when flat node file is used (PR #2303)

Jochen Topf notifications at github.com
Thu Feb 13 09:07:33 UTC 2025


This is an additional fix to the fix in 8d1a55e5. If a flat node file is used, nodes are not stored in the database (unless --middle-with-nodes is specified, but also then only nodes with tags are stored in the database).

There are two problems here:

1. The "get_node" prepared statement was not prepared in this case, so it fails when executes. This is fixed by only executing that statement if m_store_options.nodes is set in the middle.
2. If there is no node in the database, there might still be one in the flat node file. So we need to try this and create the node from the information in there. (It will only have the node id and location in it, but at least we get the location.)

This commit contains both fixes.
You can view, comment on, or merge this pull request online at:

  https://github.com/osm2pgsql-dev/osm2pgsql/pull/2303

-- Commit Summary --

  * Fix two-stage processing when flat node file is used

-- File Changes --

    M src/middle-pgsql.cpp (28)

-- Patch Links --

https://github.com/osm2pgsql-dev/osm2pgsql/pull/2303.patch
https://github.com/osm2pgsql-dev/osm2pgsql/pull/2303.diff

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

Message ID: <osm2pgsql-dev/osm2pgsql/pull/2303 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20250213/09e8024d/attachment.htm>


More information about the Tile-serving mailing list