Locus Map - forum

Support => [CZ&SK] - diskuze o Locusu => Topic started by: Milan Kerslager on July 28, 2013, 11:12:09

Title: Nerenderuje se plocha (les)
Post by: Milan Kerslager on July 28, 2013, 11:12:09
Okolo místa "Pláně pod Ještědem" má být souvislá zelená plocha, ale není. Samotné OSM, JOSM i Mapnik ale renderuji zelenou plochu správně... Kde je chyba? Vzniklo to ve chvíli, kdy jsem na hranici lesa v OSM šáhl, ale nevím, co je špatně (co by mohlo být špatně). Zkusil jsem různé vektorové mapy (svoje, OpenAdnroMaps, GpsFreeMaps.net) a výsledek je pořád stejný. Že by V Locusu byla chybka? BTW: není to jediné místo, kde takhle "zelená plocha" vypadává.
Title: Re: Nerenderuje se plocha (les)
Post by: jusc on July 29, 2013, 13:53:41
Sorry, I don´t speek Czech.
Can you please send a permalink (share) from Openstreetmap, so that I can verify it?
What is to do?
1. Go to http://www.openstreetmap.org (http://www.openstreetmap.org)
2. search the region you mean
3. expand it to have a "good overwiew"  (use the mouse wheel)
4. click on the menu button near 1. in my screenshot (share)
5. choose upcoming longclick
6 copy the new URL in 2. (on the top of my screen) into your post


click on the screen for better view.
Title: Re: Nerenderuje se plocha (les)
Post by: Milan Kerslager on July 29, 2013, 17:08:35
Here is a link: http://www.openstreetmap.org/?lat=50.72 ... 6&layers=M (http://www.openstreetmap.org/?lat=50.72086&lon=14.99839&zoom=16&layers=M)
The problem is that Locus does not fill big green multipolygons (i.e. forest in this case). I know that I touched this multipolygon (around "Plane pod Jestedem) in OSM (by using Potlach2) when it stopped working. No one vector map I tryed shows green forest around this site. I saw this bug in other areas too so I think that this is general error in rendering in Locus (probably).
Sorry for my using czech language :-)
Title: Re: Nerenderuje se plocha (les)
Post by: jusc on July 29, 2013, 18:21:40
yes I see, I tested it with newest Czech map from Openandromaps, because I feared, that the Locus store maps are "outdated". But I get the same screen. I write an email to christian (kech61).
Title: Re: Nerenderuje se plocha (les)
Post by: kech61 on July 29, 2013, 18:48:56
Quote from: "jusc"yes I see, I tested it with newest Czech map from Openandromaps, because I feared, that the Locus store maps are "outdated". But I get the same screen. I write an email to christian (kech61).

Hi,

Mapnik is forgiving, much too much, so mapper tag their multipolygons, take a look at Mapnik and find that everything is OK, what else should they do...
I'm fighting this problem all the time and just repaired the Thunsee in Switzerland, some coastlines in Scotland, Sardegna --- however, its a fight against windmills  :(

Take a look at the OSM-Inspector:
http://tools.geofabrik.de/osmi/?view=mu ... tion_lines (http://tools.geofabrik.de/osmi/?view=multipolygon&lon=14.99512&lat=50.71946&zoom=13&opacity=1.00&overlays=invalid_geometry_hull,duplicate_ways,intersections,intersection_lines)
The Multipolygon is broken, seems to be an intersection.

If you zoom out you wont even see the map behind all the error-flags of broken MP's

And, hmmmm, even if the MPs are perfect correct (the one in Question is definitly broken) Mapsforge suffers from one more problem:
Some polygones contain an outer member within a inner member (IMO perfect useless but perfect correct  ;)  ), Mapsforge cannot handle these situation and skips it.

However, for 99% of skipped MP's the reason ist uncorrect tagging/geometry.

So if you see such a problem, please start the osm inspector + josm and correct the problem, most problems are simple double nodes, self backing up lines (node + forward + node + step back + node_on_node + forward) or intersections.

Hopefully the next version of Mapsforge will contain some code to correct at least the self backing up lines, someone at the mapsforge_dev_group had contributed such a code_snippet.
Title: Re: Nerenderuje se plocha (les)
Post by: kech61 on July 29, 2013, 20:25:07
Quote from: "Milan Kerslager"Here is a link: http://www.openstreetmap.org/?lat=50.72 ... 6&layers=M (http://www.openstreetmap.org/?lat=50.72086&lon=14.99839&zoom=16&layers=M)
I know that I touched this multipolygon (around "Plane pod Jestedem) in OSM (by using Potlach2) when it stopped working.

Hi Milan,

I corrected the problem (at least the intersection), to be seen at the OSM-Inspector.
As I wrote in my previous post the Renderer of the OSM-Onlinemaps is  most forgiving, even for worst mapping errors - Mapsforge (the Library behind 95% of all Vevtormaps) is most strict.
One hint: try to move from Potlach to Josm, Potlach is a fine Editor and easy to use - however it is responsible for most of the double nodes and selfbacking up ways cause it trys to help the mapper too much in some ways.
Title: Re: Nerenderuje se plocha (les)
Post by: Milan Kerslager on July 30, 2013, 01:23:27
Thank you. Really a fight against windmills :-(
Title: Re: Nerenderuje se plocha (les)
Post by: Menion on July 31, 2013, 11:53:01
I currently don't know (don't want to read whole story) what exactly are you talking about, but I have to give a small warning. I did really a loooot of changes to mapsForge library in Locus. To be true, rendering system is completely rewrote. Thanks to this and also thanks to fact that new version of MapsForge library will use same map format, do not expect that I'll update MapsForge library in Locus to new format.

So if this problem will be solved in mapWritter plugin, then no problem. Anyway if this problem should be solved in library in application, let me know, because I have to fix it by myself in Locus.
Title: Re: Nerenderuje se plocha (les)
Post by: jusc on July 31, 2013, 11:58:16
Quote from: "menion"So if this problem will be solved in mapWritter plugin, then no problem. Anyway if this problem should be solved in library in application, let me know, because I have to fix it by myself in Locus.

What a question. Yes, please fix in application (too).  :mrgreen:
Title: Re: Nerenderuje se plocha (les)
Post by: Menion on July 31, 2013, 11:59:44
question is if this IS a problem in application (MapsForge library in app) or just in incorrect data in map format generated by mapWritter
Title: Re: Nerenderuje se plocha (les)
Post by: jusc on July 31, 2013, 12:12:07
If I understand it correctly, Mapsforge writer can not handle some incorrect mapping issues as kech wrote. But MAPNIK (the OSM Online Renderer) seems to be a bit more tolerant and solves these incorrect mappings itself.  The forest is shown here http://www.openstreetmap.org/?lat=50.72 (http://www.openstreetmap.org/?lat=50.72) ... 6&layers=M, but not in Locus.

Maybe I did not understand what you have changed. The mapsforge plugin only or together with the writer (for Locus)?
At last it would be nice to make Locus more failure tolerant too.
Title: Re: Nerenderuje se plocha (les)
Post by: Menion on July 31, 2013, 12:21:48
I'm not sure where exactly is a problem. Peter will have more information about it ...
Title: Re: Nerenderuje se plocha (les)
Post by: Milan Kerslager on July 31, 2013, 13:29:32
There has been fix for multipolygon in OSM by christiank61: http://www.openstreetmap.org/browse/changeset/17142409 (http://www.openstreetmap.org/browse/changeset/17142409) (Than you!)
I made new vector map for myself today and Locus fill the forest correctly (like Mapnik does).
Now I know where to hunt for bugs... But it seems that OSM is full of bugs like this, where Mapnik is happy and mapsforge is unhappy and skip the object rendering (if I understand correctly).
Title: Re: Nerenderuje se plocha (les)
Post by: kech61 on August 01, 2013, 07:37:12
Quote from: "Milan Kerslager"There has been fix for multipolygon in OSM by christiank61: http://www.openstreetmap.org/browse/changeset/17142409 (http://www.openstreetmap.org/browse/changeset/17142409) (Than you!)
I made new vector map for myself today and Locus fill the forest correctly (like Mapnik does).
Now I know where to hunt for bugs... But it seems that OSM is full of bugs like this, where Mapnik is happy and mapsforge is unhappy and skip the object rendering (if I understand correctly).

Glad to help you! (christiank61 is my nick at OSM)  8-)
The only problem not covered by the OSM-Inspektor are the self-backing-up lines, these have to be seached by hand.
Title: Re: Nerenderuje se plocha (les)
Post by: kech61 on August 01, 2013, 07:44:48
Quote from: "jusc"Maybe I did not understand what you have changed. The mapsforge plugin only or together with the writer (for Locus)?
At last it would be nice to make Locus more failure tolerant too.

Hi jusc,

Locus is perfect OK, the problem is related to the mapsforge library (most likely to the writer) this affects all APPs based on Mapsforge.
The logfile of the writer is full of "polygone is not a polygone (or something like this)".
It would be perfect if someone solves the self backing up lines in the Mapsforge Mapwriter in the current Version 3.0 (I will stay with this version as long as possible), all other problems can be seen at the OSM-Inspector.
Title: Re: Nerenderuje se plocha (les)
Post by: Milan Kerslager on August 01, 2013, 10:33:44
How I could get the error message ("polygone is not a polygone")?
Title: Re: Nerenderuje se plocha (les)
Post by: kech61 on August 01, 2013, 14:18:51
Quote from: "Milan Kerslager"How I could get the error message ("polygone is not a polygone")?

Hi,

Redirect the screen output of the mapsforge writer to a file, according to your favorite OS.
For Windows (DosCMD) this is eg. "mapit.bat 2>log.txt" (important is the "2" in the redirect)
Here you will find all the output of the Mapsforge writer.

Eg. Scandinavia produces a lot of errors.
However, OSM-Inspetor is the tool of my choice.

Best regards, Christian
Title: Re: Nerenderuje se plocha (les)
Post by: Milan Kerslager on August 01, 2013, 21:05:35
I thought the error message you talking about was from Locus. Now I understand and thank you a lot. Milan