joto left a comment (osm2pgsql-dev/osm2pgsql#2482)
This is interesting work, but there is quite some way to go before anything
like this can be merged.
First, there is the question of the algorithm at the core of this that tracks
changes through the highway network and merges the ways after the changes. This
is unproven on planet-sized data and we really have to make sure there are no
corner cases breaking our assumptions.
Second, there is the way this is integrated into osm2pgsql. Piggybacking this
to the expire framework doesn't sound like the right idea to me. Tiled expire
is something different than tracking geometry changes. This is really a special
case of taking the old and new geometry of some data and inferring some changes
from it. There are other cases where this could be useful and we should look
for a more general mechanism that's not specific to line end points.
Unfortunately this opens up a rabbit hole going down to some core assumptions
of the osm2pgsql architectural model which only looks at *new* data and doesn't
take old or deleted data into account. There are many reasons why we might want
to change that model, this issue here is only one of them. But that's a big
lift that will not come quickly.
I think the way forward here is to first try to validate that algorithm by
itself. I believe it should be possible to implement this without any changes
in osm2pgsql, just with database functionality. Using ON DELETE triggers it
should be possible to get access to the old geometry. This way you can
experiment with that algorithm without relying to any changes to osm2pgsql. If
and when we decide that the algorithm works, we can then see what's minimally
needed to bring this into osm2pgsql to make it easier to use than having to
work with triggers.
If anybody wants to experiment with more generic approaches of handling *old*
and *new* data at the same time, there is plenty of room to try out new
approaches. We need some way of reading back contents from the database (not
just the geometry as is done for the expire, but also all other columns from a
table entry) and feeding that data into the Lua `process_*` functions in some
way (or having different functions for that). Then we can build all sorts of
interesting processing on that. Taking the first and last point from a geometry
is then just a special case that can be implemented in Lua.
--
Reply to this email directly or view it on GitHub:
https://github.com/osm2pgsql-dev/osm2pgsql/pull/2482#issuecomment-4716464991
You are receiving this because you are subscribed to this thread.
Message ID: <osm2pgsql-dev/osm2pgsql/pull/2482/[email protected]>
_______________________________________________
Tile-serving mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/tile-serving