Re: [mkgmap-dev] [PATCH v3] Mp merge: generate-sea: bugfix for generate-sea=multipolygon
Hi WanMil, The v3 patch is working well with the Baltic map. The main land masses are there and I haven't yet spotted any missing islands. One issue, the boundaries of the tiles are visible on the land at all zoom levels (see visible-tile-boundaries.png). The boundaries are not visible on the sea. It's looking very promising (see mp-islands.png), well done. Mark attachment: visible-tile-boundaries.pngattachment: mp-islands.png___ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Re: [mkgmap-dev] [PATCH v3] Mp merge: generate-sea: bugfix for generate-sea=multipolygon
Hi WanMil, The v3 patch is working well with the Baltic map. The main land masses are there and I haven't yet spotted any missing islands. One issue, the boundaries of the tiles are visible on the land at all zoom levels (see visible-tile-boundaries.png). The boundaries are not visible on the sea. It's looking very promising (see mp-islands.png), well done. Mark Hi Mark, at the moment I have no idea why tile boundaries are visible. What do you see if you zoom in? Do you see any kind of line style or is it just an empty line? I did have a visualization of the bounding box (a motorway on the bbox) but that's definitely not part of the patch. Do you have any idea what I could looking for? WanMil ___ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Re: [mkgmap-dev] [PATCH v3] Mp merge: generate-sea: bugfix for generate-sea=multipolygon
WanMil, My workaround was based on the assumption that all polygons created by the mp code will be clipped to the bounding box later (by the style code). Can you confirm that? Yes, polys are clipped in StyledConverter.addShape(). I looked at the output using mapedit and the land has no polygons that touch the tile edges (except for other map features like woods, lakes, buildings, etc.) So the lines are not coming from stuff in the img file. Weird... Mark ___ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Re: [mkgmap-dev] [PATCH v3] Mp merge: generate-sea: bugfix for generate-sea=multipolygon
WanMil, Good news - I don't think it's your problem. I disabled the sea generation completely and the lines on the tile edges are still there. Haven't a clue what's causing them (and I don't care because they don't show up when I use generate-sea=polygons). One issue that I don't think you can do much about is that mapsource tends to show horizontal and vertical gaps between polygons when you zoom out. They are a bit weird because they come and go as you pan and zoom. Having polygons for sea (as opposed to having polygons for land, which is what I have been using) means that you get more artifacts visible when using mapsource. That's a shame but may well not be a problem when viewing the map on a real gps. Anyway, your new MP code is producing great results (and it's quick). Mark ___ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Re: [mkgmap-dev] [PATCH v3] Mp merge: generate-sea: bugfix for generate-sea=multipolygon
WanMil, Good news - I don't think it's your problem. I disabled the sea generation completely and the lines on the tile edges are still there. Haven't a clue what's causing them (and I don't care because they don't show up when I use generate-sea=polygons). One issue that I don't think you can do much about is that mapsource tends to show horizontal and vertical gaps between polygons when you zoom out. They are a bit weird because they come and go as you pan and zoom. Having polygons for sea (as opposed to having polygons for land, which is what I have been using) means that you get more artifacts visible when using mapsource. That's a shame but may well not be a problem when viewing the map on a real gps. Anyway, your new MP code is producing great results (and it's quick). Mark Mark, thanks a lot! I did have a bad test... I generated a map of belgium with generate-sea=multipolygon,no-sea-sectors and whole belgium is flodded :-( BUT I found out that some of the coastline segments are missing or are not completely contained in the OSM dump, so that's no shame for mkgmap. I think it's a general problem that the osm dumps do not contain any detailed information about the shape that was used to cut out the OSM data. Without this shape we don't have a good chance to detect the edges and to close open polygons. Maybe we can propose this to the next version of the API? Another idea is to introduce a kind of ShapeDetector which tries to regenerate the original shape of a tile / OSM dump. I don't have a good idea how to do this and I have less idea how to do this in acceptable time. Maybe we can use an java.awt.geom.Area object and add all lines with a dimension of 1 unit. At the end of reading the OSM file we could get the outer shape from the area object. But I don't think that this is quick. Anyhow the mp code of my patch is not the solution for all but at the moment it improves the handling of multipolygons very much compared to the current trunk. And after committing I think I will get some more feedback from other map generators which will help to improve things. WanMil ___ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Re: [mkgmap-dev] [PATCH v3] Mp merge: generate-sea: bugfix for generate-sea=multipolygon
Another idea is to introduce a kind of ShapeDetector which tries to regenerate the original shape of a tile / OSM dump. I don't have a good idea how to do this and I have less idea how to do this in acceptable time. Maybe we can use an java.awt.geom.Area object and add all lines with a dimension of 1 unit. At the end of reading the OSM file we could get the outer shape from the area object. But I don't think that this is quick. If now working with planet files or josm extracts I think most people use geofabrik.de extracts (or has someone succesfully used the extracts from cloudmade?). Maybe someone could give them or the osmosis team - a hand in what we would need to have changed so that a) sea polygons are complete inside the extracts b) routing over extract borders work (well this if someone finds out how to get rid of the overlap for mapsource/GPS) ___ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Re: [mkgmap-dev] [PATCH v3] Mp merge: generate-sea: bugfix for generate-sea=multipolygon
WanMil, Good news - I don't think it's your problem. I disabled the sea generation completely and the lines on the tile edges are still there. Oops, I may have spoken too soon. With your v3 patch in place, I made a new map with generate-sea=polygons and not only are the lines still there, all my sea has disappeared! Don't worry, I now think the lines between the tiles are always there on my Baltic map and I just haven't seen them before because when you use generate-sea=polygons you get polygons covering all of the map. But when you use generate-sea=multipolygon, there are no land polygons and so the lines show through from underneath. Now why they are there, I don't know at the moment (I don't think it's the fault of the MP code). However, there is still a problem in that with your v3 patch in place, I no longer get any sea polygons visible when I use generate-sea=polygons. I wonder if the change you made to the size of the sea polygons is responsible for that? Could you please change that code so that it only produces the over-large sea background when generateSeaUsingMP is true? Thanks, Mark ___ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev