[Tile-serving] [openstreetmap/osm2pgsql] Work-in-progress: Add geometry functions in Lua (PR #1636)

Jochen Topf notifications at github.com
Fri Feb 4 15:51:34 UTC 2022


This is intended to show how geometry processing in Lua could work. Only some example functions are implemented and not for all geometry types, error detection is limited etc.
    
Geometry creation functions:
* as_point() (for nodes)
* as_linestring() (for ways)
* as_polygon() (for ways)
* as_multipolygon() (for relations)
    
Geometry functions:
* area() (for polygons)
* centroid() (for polygons)
* simplify() (for linestrings)
    
See the file flex-config/custom-geometries.lua for an example that shows how to use these.

You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/osm2pgsql/pull/1636

-- Commit Summary --

  * Add adaptor making boost::geometry work with our geometry classes
  * Work-in-progress: Add geometry functions in Lua

-- File Changes --

    A flex-config/custom-geometries.lua (165)
    M src/flex-table-column.cpp (23)
    M src/flex-table-column.hpp (14)
    A src/geom-boost-adaptor.hpp (84)
    M src/geom-from-osm.cpp (19)
    M src/geom-from-osm.hpp (4)
    M src/geom-functions.cpp (45)
    M src/geom-functions.hpp (4)
    M src/init.lua (6)
    M src/output-flex.cpp (284)
    M src/output-flex.hpp (11)

-- Patch Links --

https://github.com/openstreetmap/osm2pgsql/pull/1636.patch
https://github.com/openstreetmap/osm2pgsql/pull/1636.diff

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

Message ID: <openstreetmap/osm2pgsql/pull/1636 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20220204/c1e750c8/attachment.htm>


More information about the Tile-serving mailing list