#10419 closed defect (fixed)
addr:housenumber is not drawn when text did not fit into building area
Reported by: | mdk | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 14.08 |
Component: | Core mappaint | Version: | latest |
Keywords: | template_report | Cc: | bastiK, Klumbumbus |
Description
What steps will reproduce the problem?
Load way 232053924
What is the expected result?
Building should show text "41".
What happens instead?
House number is missing.
For larger text it is ok, that it is only shown conditional, but for housenumbers it is very bad. Especially when the building has a shape where the "center" point is outside the building. In this case the housenumber is never shown.
So either the housenumbers should be shown always or the point for the lable should be calculated in a smarter way, so that he is always inside the area (see the same building in osm.org)
Repository Root: http://josm.openstreetmap.de/svn Build-Date: 2014-08-22 01:36:32 Last Changed Author: Don-vip Revision: 7437 Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b URL: http://josm.openstreetmap.de/svn/trunk Last Changed Date: 2014-08-22 00:58:24 +0200 (Fri, 22 Aug 2014) Last Changed Rev: 7437 Identification: JOSM/1.5 (7437 en) Linux Ubuntu 14.04.1 LTS Memory Usage: 142 MB / 876 MB (30 MB allocated, but free) Java version: 1.7.0_65, Oracle Corporation, OpenJDK Server VM Java package: openjdk-7-jre:i386-7u65-2.5.1-4ubuntu1~0.14.04.1 VM arguments: [-Djosm.restart=true, -Djosm.home=/home/michael/.josm-latest, -Djava.net.useSystemProxies=true] Dataset consistency test: No problems found Plugins: - ColumbusCSV (30416) - FastDraw (30416) - HouseNumberTaggingTool (30416) - OpeningHoursEditor (30519) - RoadSigns (30495) - SimplifyArea (30416) - buildings_tools (30485) - contourmerge (1010) - imagery_offset_db (30534) - poly (30495) - public_transport (30416) - reltoolbox (30587) - reverter (30521) - terracer (30416) - turnrestrictions (30454) - utilsplugin2 (30460)
Attachments (1)
Change History (13)
comment:1 by , 10 years ago
Cc: | added |
---|---|
Component: | Internal mappaint style → Core mappaint |
comment:2 by , 10 years ago
As mdk suggests, smarter label placement inside areas or an additional mapcss flag to force text rendering even if it does not fit inside.
comment:3 by , 10 years ago
Cc: | added |
---|
comment:5 by , 10 years ago
Milestone: | → 14.08 |
---|
follow-up: 9 comment:7 by , 10 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
I attached two buildings which still fail. But I don't know if we could find a solution which always find a label placement where the complete label box fit into area. Perhaps we must satisfied with just finding a label placement node inside (or even near) the area.
I think for "strange" areas we should better try to place the house number somewhere on the area instead of hiding the house number!
follow-up: 10 comment:9 by , 10 years ago
Replying to mdk:
I attached two buildings which still fail.
Yes, I knew these types of buildings would fail.
But I don't know if we could find a solution which always find a label placement where the complete label box fit into area.
In theory we could always find a good placement for short house numbers but it would be very time consuming I'm afraid. The algorithm I have implemented is very basic but it is fast and I think it will work in the vast majority of real-world buildings. I have observed significant improvements in my town with non-square shaped buildings (but not so extreme as these examples).
My question is: are these building shapes real ones, or did you create them just to highlight a case where the algorithm doesn't work?
I think for "strange" areas we should better try to place the house number somewhere on the area instead of hiding the house number!
Not so easy. Defining the "somewhere on the area" is the crucial, time-consuming work.
comment:10 by , 10 years ago
Replying to Don-vip:
Replying to mdk:
I attached two buildings which still fail.
Yes, I knew these types of buildings would fail.
But I don't know if we could find a solution which always find a label placement where the complete label box fit into area.
In theory we could always find a good placement for short house numbers but it would be very time consuming I'm afraid. The algorithm I have implemented is very basic but it is fast and I think it will work in the vast majority of real-world buildings. I have observed significant improvements in my town with non-square shaped buildings (but not so extreme as these examples).
My question is: are these building shapes real ones, or did you create them just to highlight a case where the algorithm doesn't work?
Point for you - they are artificial. And you are right, we should not solve problems, we don't have.
I think for "strange" areas we should better try to place the house number somewhere on the area instead of hiding the house number!
Not so easy. Defining the "somewhere on the area" is the crucial, time-consuming work.
Why not in the rare case where your algorithm fails, just place the label in the focus point (or what ever you want). Every place is better than no house number.
BTW: how dose the style from openstreetmap.org manage to place always a house number? Even if this method is very expensive, if you use it as a fall back, it is only used a few times.
I look around in the historic center of Winterthur and found some real buildings which fail:
http://www.openstreetmap.org/way/75027461 (data failure: addr:housename instead of addr:housenumber)
http://www.openstreetmap.org/way/73590579 (fixed in r7459)
http://www.openstreetmap.org/way/72414575 (fixed in r7459)
http://www.openstreetmap.org/way/113624570 (fixed in r7459)
http://www.openstreetmap.org/way/68249246 (fixed in r7459)
or produce funny results (it's ok ;-):
http://www.openstreetmap.org/way/75027427
Edit: sorry I messed up and uses an old JOSM first. No real failure left :-)
comment:11 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
OK let's close this ticket then :)
@Paul: any idea how to fix that?