Get a Relation as a Centroid "Point" #813
-
Node and (multipolygon) ways can easily be written into a "centroid" point using the I'm curious if that is supposed to work on relation too ? For instance, I'd like to cover such "object" into a single point -> https://www.openstreetmap.org/relation/10621048 So I'm calling the same function under the
it seems to be working (I do manage to see 2 new POI on my map) but to the expense of 30mb increase (for 2 relations -> I'm printing the ID each time my function is called and confirm only 2 relations are processed) ! Am I doing anything wrong ? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
https://www.openstreetmap.org/relation/10621048 is a valid multipolygon, so I'd expect it to work. I use One thing that I did notice (alas can't remember where) was that if you ask Tilemaker to write an area geometry for something that's not quite a valid area, it'll have a go - I added a bunch of |
Beta Was this translation helpful? Give feedback.
-
Any relation whose |
Beta Was this translation helpful? Give feedback.
-
Thank you guys! I confirm it's working. |
Beta Was this translation helpful? Give feedback.
Any relation whose
type
ismultipolygon
orboundary
is in fact handled byway_function
rather thanrelation_function
. So you should be able just to include this in yourway_function
without relation-specific code.