Skip to content

Peculiar behavior of new label layer #776

Closed

Description

@Klaus-Tockloth

The new label layer shows a peculiar behavior ...

That's the result with the label layer (only a few house numbers):

bildschirmfoto 2016-01-30 um 22 18 27

And this is the result without the label layer (nearly all (but not all) house numbers are visible):

bildschirmfoto 2016-01-30 um 22 19 07

And this is the situation in OSM:
http://www.openstreetmap.org/#map=19/51.96395/7.63848

bildschirmfoto 2016-01-31 um 08 48 47

The problem occurs with Cruiser (1.4.0 - 20160130) and with Atlas (1.2.0-20160130).

Klaus

Activity

  1. devemux86 commented on Jan 31, 2016

    @devemux86
    Collaborator

    I can confirm the issue - it can also be reproduced with Samples.

    Old LabelLayer:
    old

    New LabelLayer:
    new

    (related to #763)

  2. ludwigb commented on Jan 31, 2016

    @ludwigb
    Collaborator

    I think the reason is the following:

    as an optimization we (= I, culpa mea) only store ways if they have a name
    to them (otherwise we would essentially need to cache all data). The houses
    here have probably no name, but a house number.
    The house numbers that do show up are probably points (not on ways, thats
    is why they are on entrances and the like).

    The fix will be to also store ways if they have a house number, or an
    elevation ....

    Ludwig

    On 31 January 2016 at 18:07, Emux [email protected] wrote:

    I can confirm the issue - it can also be reproduced with Samples.

    Old LabelLayer:
    [image: old]
    https://cloud.githubusercontent.com/assets/3484020/12701477/17c5231a-c813-11e5-8601-a63f145f6ed8.png

    New LabelLayer:
    [image: new]
    https://cloud.githubusercontent.com/assets/3484020/12701479/1ef4f142-c813-11e5-86f2-c07cd38cecf9.png

    (related to #763 #763)

    —
    Reply to this email directly or view it on GitHub
    #776 (comment)
    .

  3. applantation commented on Jan 31, 2016

    @applantation
    Collaborator

    I just pushed a fix to dev.

    On 31 January 2016 at 19:22, ludwigb [email protected] wrote:

    I think the reason is the following:

    as an optimization we (= I, culpa mea) only store ways if they have a name
    to them (otherwise we would essentially need to cache all data). The houses
    here have probably no name, but a house number.
    The house numbers that do show up are probably points (not on ways, thats
    is why they are on entrances and the like).

    The fix will be to also store ways if they have a house number, or an
    elevation ....

    Ludwig

    On 31 January 2016 at 18:07, Emux [email protected] wrote:

    I can confirm the issue - it can also be reproduced with Samples.

    Old LabelLayer:
    [image: old]
    <
    https://cloud.githubusercontent.com/assets/3484020/12701477/17c5231a-c813-11e5-8601-a63f145f6ed8.png

    New LabelLayer:
    [image: new]
    <
    https://cloud.githubusercontent.com/assets/3484020/12701479/1ef4f142-c813-11e5-86f2-c07cd38cecf9.png

    (related to #763 #763)

    —
    Reply to this email directly or view it on GitHub
    <
    https://github.com/mapsforge/mapsforge/issues/776#issuecomment-177455738>
    .

    —
    Reply to this email directly or view it on GitHub
    #776 (comment)
    .

  4. added this to the 0.6.1 milestone on Jan 31, 2016
  5. devemux86 commented on Jan 31, 2016

    @devemux86
    Collaborator

    That did the job.

    It's worth mentioning that we support:

    • In nodes: name, addr:housenumber, ele
    • In ways: name, addr:housenumber, ref
  6. ludwigb commented on Jan 31, 2016

    @ludwigb
    Collaborator

    Yes, nodes are always included, ways now only if they have additional
    information that is displayed as a label.

    On 31 January 2016 at 20:26, Emux [email protected] wrote:

    That did the job.

    It's worth mentioning that we support:

    • In nodes: name, addr:housenumber, ele
    • In ways: name, addr:housenumber, ref

    —
    Reply to this email directly or view it on GitHub
    #776 (comment)
    .

  7. eartrumpet commented on Feb 7, 2016

    @eartrumpet

    Yes, nodes are always included, ways now only if they have additional information that is displayed as a label.

    I don't know the reason for that, but it creates unexpected behavior.

    For example for amenity=parking, it's often used as ways without any of the other information. But I want to display the symbol for parking (as in renderthemeV4) and that works well without label layer, but not with label layer activated.

  8. devemux86 commented on Feb 7, 2016

    @devemux86
    Collaborator

    @eartrumpet you mean the new label layer?

  9. devemux86 commented on Feb 7, 2016

    @devemux86
    Collaborator

    The comparison can be done in the two Samples examples:

    • Old "Separate LabelLayer using LabelStore"
    • New "Threaded LabelLayer using MapDataStore"

    New implementation at same area / zoom level shows far less (area) symbols e.g. parkings.

  10. Klaus-Tockloth commented on Feb 7, 2016

    @Klaus-Tockloth
    Author

    Question: What triggers a street label to go into the label layer?

    I general have the problem that not all street labels are shown on the map. Screenshot from Atlas:

    bildschirmfoto 2016-02-07 um 20 18 09

    What you see on the screenshot is only the street label "Hafenweg" (a residential), but not the labels of the streets in the north (also residentials). The label layer is activated. I have made tests with Atlas 1.2.1 and Cruiser 1.4.1. No results is convincing. Maybe I'm doing something wrong. Any ideas?

    Klaus

  11. devemux86 commented on Feb 7, 2016

    @devemux86
    Collaborator

    I agree that it's not the desired behavior for road labels (with label layer or not).
    See also #644 for relevant discussion.

  12. eartrumpet commented on Feb 7, 2016

    @eartrumpet

    Yes, the new label layer. Tested with latest Atlas/Cruiser from today.
    Symbols for ways are not shown independent of zoom level if the way has no name/addr:housenumber/ref.
    That makes sense if the label layer contains only captions, but not for symbols where those values are irrelevant.

  13. 7 remaining items

  14. devemux86 commented on Feb 8, 2016

    @devemux86
    Collaborator

    I'd avoid putting (more) work in render theme processing.
    Despite our improved parsing, I still find several occasions where themes are heavy and as consequence the engine seems slow to users.
    I'd prefer any method that pulls the weight away from the clients.
    Note: Label layer 'as is' is already cpu intensive compared to regular rendering.

  15. eartrumpet commented on Feb 8, 2016

    @eartrumpet

    I'm aware of that, but it's still the choice of the user to use a more complex theme.
    Every other solution which relies on preprocessed maps etc. has probably issues with compatibility. One of the strengths of mapsforge is that every user can adapt a theme (or create a new one), and lesser preprocessing helps this. If only symbols of certain tags that are predefined appear in the label layer, it won't work if the map creator had different items in mind than a user. And it breaks consistency: it would work without label layer, but not with.

  16. ludwigb commented on Feb 10, 2016

    @ludwigb
    Collaborator

    I have just added a hook into the MapDatabase that allows defining a method that will select additional ways into the LabelLayer depending on tags. By default, only the ways that were previously included selected, but the method allows inspecting the tags.

    The motivation is as follows:
    -- for memory reasons we should include as few ways into the LabelLayer.
    -- additional freedom for those who design apps that allow user defined render themes.
    -- apps that do not allow user maps/renderthemes should not be affected in a significant way.

    Be aware that the new method can be expensive as every way has to be inspected. If an app decides to include every way (by returning true regardless of tags), the app might be experiencing OOM errors.

    I think this solution gives most of the freedom desired but without too much of an overhead.

  17. devemux86 commented on Feb 10, 2016

    @devemux86
    Collaborator

    Thanks @ludwigb, I'll test how it behaves.

  18. devemux86 commented on Feb 11, 2016

    @devemux86
    Collaborator

    I published new Atlas / Cruiser with the above hook including all ways in LabelLayer.

    Let's see in action if there are any problems - leaving the issue open for now.
    I'm in favor of any performance boost, though users expect to see the same elements in both layer methods, so we'll have more questions like this.

  19. Klaus-Tockloth commented on Feb 11, 2016

    @Klaus-Tockloth
    Author

    How to test this new feature? What are the use cases?

  20. devemux86 commented on Feb 11, 2016

    @devemux86
    Collaborator

    It's about what @eartrumpet mentioned above.
    Ways that have not label (but we want to show a symbol on them), are not included by default in new LabelLayer, e.g. parkings with RenderThemeV4.

    @ludwigb pushed a hook (which I included above), permitting to have old behavior back, i.e. parse all ways regardless of their labeling.

  21. devemux86 commented on Feb 11, 2016

    @devemux86
    Collaborator

    @Klaus-Tockloth see also my above post for Samples.

  22. eartrumpet commented on Feb 12, 2016

    @eartrumpet

    I published new Atlas / Cruiser with the above hook including all ways in LabelLayer.

    Thanks @devemux86

    I just did a quick test, now everything works again as expected (label layer show more labels again because of tile border issue without label layer).

    Of course it's slower than without label layer, the interesting difference would be comparing this with the other method (without all ways included).

  23. devemux86 commented on Feb 12, 2016

    @devemux86
    Collaborator

    the interesting difference would be comparing this with the other method (without all ways included)

    The Samples example "Threaded LabelLayer using MapDataStore" includes only the labeled ways.

  24. eartrumpet commented on Feb 13, 2016

    @eartrumpet

    I tested all three variants in current Samples apk (separate labellayer using mapdatastore, threaded labellayer using mapdatastore, separate labellayer using labelstore), same map, same theme (renderthemeV4 topo with all overlays), same position. Taking the rendertime showed no significant differences between all three implementations, I tested at low and high zoom.

  25. devemux86 commented on Feb 13, 2016

    @devemux86
    Collaborator

    Are you sure?

    Regular "Map Viewer Rendertheme V4" and old "Separate LabelLayer using LabelStore" show all parkings.

    New "Threaded LabelLayer using MapDataStore" shows only labeled ways, so far less parkings.
    i.e. the hook is not enabled by default there.
    ("Separate LabelLayer using MapDataStore" is the same without threading)

  26. eartrumpet commented on Feb 13, 2016

    @eartrumpet

    Of course more parkings are shown with labelstore in comparison to mapdatastore, but no difference in rendertime (1st gen. Moto G LTE).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions