Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

Polygon label placement is broken for tiny polygons #3869

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 2 comments
Closed

Polygon label placement is broken for tiny polygons #3869

openstreetmap-trac opened this issue Jul 23, 2021 · 2 comments

Comments

@openstreetmap-trac
Copy link

Reporter: Pepou
[Submitted to the original trac issue database at 7.40am, Monday, 27th June 2011]

I've been long struggling with [http://www.openstreetmap.org/browse/way/118596170 this (118596170) polygon]'s label - I was not being able to find it displayed on map, until I've noticed it being incorrectly placed a few hundred meters to the side. (The object is a simple 6-point polygon approx. 6 meter long - a tourism attraction.)

Create a 2x2 meter large 4 point polygon, tag and name it appropriately (e.g. amenity=school, name="School placed on our street"). The label will be most probably not 'visible' (zoom out might be necessary to locate it). Move around the corner points by few pixels - the label will erratically jump around in up to multiple hundred meter steps.

I understand that if a label is much larger than its objects, it is impossible to place it inside. But why not over the object or tightly near it???

@openstreetmap-trac
Copy link
Author

Author: stevage
[Added to the original trac issue at 2.24am, Friday, 20th April 2012]

Confirmed, there is something seriously amiss with the label placement for very small area ways. Dragging nodes around causes wild fluctuations in the label placement, frequently appearing well outside the bounds of the way.

I suspect a rounding error.

@openstreetmap-trac
Copy link
Author

Author: stevage
[Added to the original trac issue at 2.11pm, Sunday, 6th May 2012]

Fixed here: systemed/potlatch2#66

It was indeed a floating point issue, solved by Jeffrey Sax at StackOverflow.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant