Modify

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#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)

10419.osm (6.3 KB ) - added by mdk 10 years ago.
still failing in r7459

Download all attachments as: .zip

Change History (13)

comment:1 by Don-vip, 10 years ago

Cc: bastiK added
Component: Internal mappaint styleCore mappaint

@Paul: any idea how to fix that?

comment:2 by bastiK, 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 Klumbumbus, 10 years ago

Cc: Klumbumbus added

comment:4 by Klumbumbus, 10 years ago

A bit related: #10369

comment:5 by Don-vip, 10 years ago

Milestone: 14.08

comment:6 by Don-vip, 10 years ago

Resolution: fixed
Status: newclosed

In 7459/josm:

fix #10419 - improved label placement inside areas (ex: addr:housenumber on buildings)

by mdk, 10 years ago

Attachment: 10419.osm added

still failing in r7459

comment:7 by mdk, 10 years ago

Resolution: fixed
Status: closedreopened

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!

comment:8 by Klumbumbus, 10 years ago

For the left one the number appears on the bottom at high zoom.

in reply to:  7 ; comment:9 by Don-vip, 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.

in reply to:  9 comment:10 by mdk, 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 :-)

Last edited 10 years ago by mdk (previous) (diff)

comment:11 by Don-vip, 10 years ago

Resolution: fixed
Status: reopenedclosed

OK let's close this ticket then :)

comment:12 by Don-vip, 10 years ago

Ticket #8226 has been marked as a duplicate of this ticket.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.