Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mapsforge lines not rendered correctly at large zooms #109

Closed
stleusc opened this issue Aug 7, 2016 · 8 comments
Closed

Mapsforge lines not rendered correctly at large zooms #109

stleusc opened this issue Aug 7, 2016 · 8 comments
Labels

Comments

@stleusc
Copy link

stleusc commented Aug 7, 2016

how to reproduce the issue:

Used mapsforge map: http://ftp5.gwdg.de/pub/misc/openstreetmap/openandromaps/maps/Germany/sachsen.zip

Used render theme:
default.xml, with one modification:

added:

        <m k="contour_ext" zoom-min="10">
            <m v="elevation_major">
                <line stroke="#8E8072" width="1.3" />
            </m>
        </m>

right after

<m e="way">

to enable rendering of elevation lines.

Enable GridLayer for easier navigation.
Go to Grid 16/35226/21988
The line that makes a sharp 'turn' to the left should connect to the line straight above it.

Panning the map around there are many wrong rendered lines visible.

Image attached
screenshot_20160807-191342

@stleusc
Copy link
Author

stleusc commented Aug 7, 2016

Rendering the same map file in Locus does not present that issue, so I assume it is VTM and not the map

@stleusc
Copy link
Author

stleusc commented Aug 7, 2016

Also ran the same example in latest mapsforge android demo... looks correct (of course I had to adjust the theme to get it rendered).

@devemux86 devemux86 added the bug label Aug 8, 2016
@devemux86
Copy link
Collaborator

devemux86 commented Aug 8, 2016

  • Mapsforge uses software rendering
  • AFAIK Locus uses a modified Mapsforge version
  • VTM uses OpenGL in rendering

I remember reading a similar case in OpenScienceMap repository, see opensciencemap#122

Are you sure that this problem appears now after latest commits, previously it worked correctly?

@devemux86
Copy link
Collaborator

I checked before yesterday's commits and this issue appears there too.
So it's not something new with Mapsforge maps rendering.

There are two things to consider here:

  • VTM uses older Mapsforge code for parsing its maps (we could update it)
  • OpenGL is different and more strict than software rendering in such cases

@stleusc
Copy link
Author

stleusc commented Aug 8, 2016

Sorry if I implied in any way that this issue was due to a recent change.
My app uses a rather old version of original VTM. I noticed the issue there. But of course no sense of reporting it if it was fixed already, so I tried your latest version and a few other tools for reference. This is not new....

But I have a few ideas...
a) old issue opensciencsemap#122 occured exactly on tile edges and artifacts changed with zoom, this is not 100% the same... right now the artifact is the same across all zoom levels.
b) contour lines were never visible, so I'm thinking this could be something since day 1
c) it almost looks like reading map data so updating the parser would be a good start I think.

Anything I can be of help? Not an OpenGL expert at all though ;-)

@devemux86
Copy link
Collaborator

devemux86 commented Aug 8, 2016

a) old issue opensciencsemap#122 occured exactly on tile edges and artifacts changed with zoom, this is not 100% the same... right now the artifact is the same across all zoom levels.

Note that Mapsforge maps work with sub-files based on zoom intervals. Details for all these exist in our docs for map file format and map writer.
Last zoom interval starts at 12 with base zoom 14, where data is retrieved. So you can still see the problem at zoom 12 coming from the 14 tiles grid.

The issue exists also in some lake polygons that are split among 4 adjacent tiles, so it's not only on contour lines (or they're contour polygons?).

If this is due to old Mapsforge parsing, then the answer could be in VTM MapDatabase class compared with equivalent Mapsforge MapFile class.

@stleusc
Copy link
Author

stleusc commented Aug 8, 2016

yes, I would say it stays the same below zoom 12...

@devemux86 devemux86 changed the title lines not rendered correctly using android-example app based on latest commit Mapsforge lines not rendered correctly at large zooms Aug 10, 2016
@devemux86
Copy link
Collaborator

devemux86 commented Nov 7, 2016

@stleusc could you check again your case with latest master-SNAPSHOT after the TileClipper buffer increase in #231?

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

No branches or pull requests

2 participants