[Tile-serving] [openstreetmap/osm2pgsql] Supporting locations_on_ways format extension? (#1519)
mmd
notifications at github.com
Sat Jun 5 08:49:32 UTC 2021
Since libosmium has support for _locations on ways_, I was wondering if this format extension might be relevant for osm2pgsql as well, at least for an initial load.
The toy example below was the bare minimum needed to import such a PBF file. I'm sure, a more sophisticated approach is possible by evaluating the PBF header pbf_optional_feature, which should include an `LocationsOnWays` in that case.
Calling osm2pgsql using:` -r pbf,locations_on_ways=true`
middle-ram.cpp:
Added in set_requirements (for testing purposes only)
`m_store_options.way_nodes = false;`
line 200, nodes_get_list
```
if (m_store_options.locations) {
for (auto &nr : *nodes) {
if (nr.location().is_undefined()) <<< added check. locations_on_ways pbf can skip set_location
nr.set_location(m_node_locations.get(nr.ref()));
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/discussions/1519
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20210605/4ea6bec2/attachment.htm>
More information about the Tile-serving
mailing list