Skip to content

Conversation

@lonvia
Copy link
Member

@lonvia lonvia commented Oct 24, 2025

This PR introduces a new table place_entrance into which entrance nodes are now imported by osm2pgsql. This greatly simplifies processing for the entrances as they no longer have to go through the complex trigger mechanisms on updates. It also means we can remove the hack to suppress entrances in the placex table which caused addresses to be dropped.

Migration warning

The PR takes the unusual step of modifying an existing migration. It drops the creation of the special index on place introduced with #3807. Setting up the index is slightly expensive and completely unnecessary, when going to the separate place_entrance table right away in the next step.

There is also no migration to move existing entrances from the place table to the place_entrance table. Again, this would be a rather expensive operation and only required by installations that directly follow master instead of using releases. If you do that, you can either just let the entrance table refill itself naturally with updates or manually copy over the entrances:

INSERT INTO place_entrance (osm_id, type, extratags, geometry)
    SELECT osm_id, type, extratags, geometry FROM place WHERE class in ('entrance', 'routing:entrance') and osm_type = 'N'
    ON CONFLICT DO NOTHING

Fixes #3858.

@lonvia lonvia merged commit 353c985 into osm-search:master Oct 24, 2025
8 checks passed
@lonvia lonvia deleted the fix-entrance-addresses branch October 24, 2025 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Housenumber nodes with entrance tags are dropped

1 participant