[Tile-serving] [openstreetmap/osm2pgsql] Work-in-progress: Add geometry functions in Lua (PR #1636)
Jochen Topf
notifications at github.com
Fri Feb 4 16:33:47 UTC 2022
There are some issues with this approach:
* Performance: It is unclear whether all of this processing and jumping between C++ and Lua is fast enough. This needs more testing.
* Projections: Currently you can set the projection only in the table definition and it will be done automatically when a geometry is set. This is probably not enough, for instance when calculating an area in a different projection, we need to be able to project first, then calculate the area. So something like this would probably need adding: `geom:as_polygon():transform(3857):area()`.
* Backwards compatibility and "magic" geometry processing: The old way of handling geometries was somewhat magic, for instance long lines could be split and then `add_row()` would add multiple rows with those split geometries. The "new" way doesn't do that any more. We'd have a `split_linestrings()` function in Lua and then need to write a loop in Lua to add several rows. This makes certain types of processing harder to write in the config file and (probably) slower to process. But it allows more flexibility, for instance now multiple geometry columns are easily done, because the new geometry column types behave just like any other column type. It is difficult to wrap your head around all this, especially when old and new geometry types are mixed.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/1636#issuecomment-1030150616
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/osm2pgsql/pull/1636/c1030150616 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20220204/ebd7e849/attachment.htm>
More information about the Tile-serving
mailing list