[Tile-serving] [openstreetmap/osm2pgsql] WORK IN PROGRESS: Add pole_of_inaccessibility() function in Lua for polygons (PR #1822)
Jakob Miksch
notifications at github.com
Fri Nov 18 17:56:51 UTC 2022
@JakobMiksch commented on this pull request.
> + name = tags.name,
+ tags = tags,
+ geom = geom,
+ -- The centroid is easy and fast to calculate
+ centroid = geom:centroid(),
+ -- The pole of inaccessibility can take a bit longer
+ poi1 = geom:pole_of_inaccessibility(),
+ -- The first parameter is the precision (by default it is set to
+ -- max(width, height) of the polygon envelope (bounding box), but
+ -- you can set it higher which makes the result less precise but
+ -- faster to calculate.
+ --
+ -- The second parameter is a "stretch" factor for the Y axis. Make
+ -- this larger than 1 (the default) to use an ellipse instead of a
+ -- circle when calculating the point. This makes it more suitable
+ -- for labels which usually have larger width that height.
```suggestion
-- for labels which usually have larger width than height.
```
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/1822#pullrequestreview-1186551067
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/osm2pgsql/pull/1822/review/1186551067 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20221118/c48b56ec/attachment.htm>
More information about the Tile-serving
mailing list