
Hello, I have a tile out of splitter which covers the area http://www.openstreetmap.org/?minlon=-81.342773&minlat=41.220703&maxlon=-79.... . I did not find yet any option to have the lakes (delimited by natural=coastline) rendered properly. I tried various generate-sea options but did not get the expected result. With no --generate sea I get only parts of Lake Erie and Lake Ontario with water (I guess because there are some water=* polygons in those particular places) With extends-sea-sector, MapSource crashes With multipolygons or no-sea-sectors, both lakes are OK but Ontario is flooded With polygons the whole tile is flooded What options should I use to get it right? Thanks, N.

On Wed, Mar 23, 2011 at 01:56:04PM -0400, Nakor wrote:
What options should I use to get it right?
Have you tried to load the map extract (or just the natural=coastline ways of it) in JOSM and invoke the validator to see if everything is correct? Last time I checked, the coastline checks were part of the INFO level. People tend to break coastlines from time to time. For mkgmap, it can mean garbage in, garbage out. Software cannot always make the right guesses to fix errors. Marko

On 3/23/2011 3:16 PM, Marko Mäkelä wrote:
On Wed, Mar 23, 2011 at 01:56:04PM -0400, Nakor wrote:
What options should I use to get it right? Have you tried to load the map extract (or just the natural=coastline ways of it) in JOSM and invoke the validator to see if everything is correct? Last time I checked, the coastline checks were part of the INFO level.
People tend to break coastlines from time to time. For mkgmap, it can mean garbage in, garbage out. Software cannot always make the right guesses to fix errors.
Marko, I checked the coastlines and there is nothing wrong there. Now if I extract just the coastline and run mkgmap on that, every thing is fine: * no sea at all without --generate-sea * correct result with all options except polygons * flooded tile with polygons What could be flooding parts of my tile then? Thanks, N.

On 03/24/2011 04:41 PM, Nakor wrote:
On 3/23/2011 3:16 PM, Marko Mäkelä wrote:
On Wed, Mar 23, 2011 at 01:56:04PM -0400, Nakor wrote:
What options should I use to get it right? Have you tried to load the map extract (or just the natural=coastline ways of it) in JOSM and invoke the validator to see if everything is correct? Last time I checked, the coastline checks were part of the INFO level.
People tend to break coastlines from time to time. For mkgmap, it can mean garbage in, garbage out. Software cannot always make the right guesses to fix errors.
Marko,
I checked the coastlines and there is nothing wrong there. Now if I extract just the coastline and run mkgmap on that, every thing is fine.
I take that back. I am not able to get a correct tile now for that one although the coastline is correct.

On Thu, Mar 24, 2011 at 10:36:30PM -0400, Nakor wrote:
I checked the coastlines and there is nothing wrong there. Now if I extract just the coastline and run mkgmap on that, every thing is fine.
I take that back. I am not able to get a correct tile now for that one although the coastline is correct.
Are the coastline polygons complete, or does your map extract end in the middle of the tile? Did you try enabling some warnings, like this: cat > logging.properties << EOF .level=WARNING uk.me.parabola.mkgmap.build.MapSplitter.level=WARNING handlers: java.util.logging.FileHandler java.util.logging.FileHandler.level=FINE java.util.logging.FileHandler.formatter=uk.me.parabola.log.UsefulFormatter java.util.logging.FileHandler.limit=5000000 java.util.logging.FileHandler.count=4 java.util.logging.FileHandler.pattern=mkgmap.log java.util.logging.FileHandler.append=false EOF java -Xmx1024m -ea -Dlog.config=logging.properties -jar mkgmap.jar ... After the run, search mkgmap.log.0 case-insensitively for "coastline" and "polygon". This is based on my logging.properties file (available from http://www.polkupyoraily.net/osm/), which I in turn adapted from an email here a long time ago. The JOSM validator does not find all errors that mkgmap does. For example, if you have two islands on top of each other, or an island in the mainland, JOSM will not complain, unless two natural=coastline ways intersect. mkgmap will notice the land-on-land situation and complain. (For water-on-water, it will warn and convert the anti-island to an island.) Marko

So I have played a little bit more and came with a file where there are just three straight lines that represent the main idea of the tile. I am getting to get right (see attached file). This files fails to build the sea sectors properly (i.e. the north portion of the tile is inundated). Unless I am missing the obvious there is a bug in the sea generator. Thanks, N.

Nakor, thanks for the very minimalistic example. This is great because that's easy to debug. With generate-sea=multipolygon the SeaGenerator works fine but there seems to be a bug in the multipolygon processing which causes flooding of the north part. I haven't tried generate-sea=polygon. Maybe someone else can test this and track that down? WanMil
So I have played a little bit more and came with a file where there are just three straight lines that represent the main idea of the tile. I am getting to get right (see attached file). This files fails to build the sea sectors properly (i.e. the north portion of the tile is inundated). Unless I am missing the obvious there is a bug in the sea generator.
Thanks,
N.

I have posted a first patch. Using that patch your example works with generate-sea=multipolygon. At the moment I have no time to check that patch in deep and if it completely covers all situations. Please check it yourself. I will need at least one week to do the rest. WanMil
Nakor,
thanks for the very minimalistic example. This is great because that's easy to debug.
With generate-sea=multipolygon the SeaGenerator works fine but there seems to be a bug in the multipolygon processing which causes flooding of the north part.
I haven't tried generate-sea=polygon. Maybe someone else can test this and track that down?
WanMil
So I have played a little bit more and came with a file where there are just three straight lines that represent the main idea of the tile. I am getting to get right (see attached file). This files fails to build the sea sectors properly (i.e. the north portion of the tile is inundated). Unless I am missing the obvious there is a bug in the sea generator.
Thanks,
N.
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

On 03/26/2011 06:07 AM, WanMil wrote:
I have posted a first patch. Using that patch your example works with generate-sea=multipolygon. At the moment I have no time to check that patch in deep and if it completely covers all situations. Please check it yourself. I will need at least one week to do the rest.
WanMil
I will look into it with the few tiles that I had failing and let you know. Thanks!

I checked with my current map (Southern Ontario and Quebec) and it works fine. The few tiles that were failing are not anymore. I will try with some larger extracts (like whole Canada+US) to see if it still works fine
I will need at least one week to do the rest.
What is the rest? Thanks, N.

I checked with my current map (Southern Ontario and Quebec) and it works fine. The few tiles that were failing are not anymore. I will try with some larger extracts (like whole Canada+US) to see if it still works fine
I will need at least one week to do the rest.
What is the rest?
Thanks,
N.
The algorithm that decides where to place the cuts has the same bug. I'll have to test a bugfix for that and will post an improved patch. WanMil

Hello, I have been playing with the new patch and found another tile where there was issues.The tile covers the southern part of lake Huron: http://www.openstreetmap.org/?minlon=-83.71582029999999&minlat=42.8027344&ma... (disregard the flood in the southeast corner in Mapnik this was due to a now fixed broken coastline). In that case extend-sea works fine but multipolygon fails. I have been able to reproduce this on the fairly simple attached file. See also attached screenshot for the result tile as generated by mkgmap using both options. Thanks, N.

Hello,
I have been playing with the new patch and found another tile where there was issues.The tile covers the southern part of lake Huron: http://www.openstreetmap.org/?minlon=-83.71582029999999&minlat=42.8027344&ma... (disregard the flood in the southeast corner in Mapnik this was due to a now fixed broken coastline).
In that case extend-sea works fine but multipolygon fails. I have been able to reproduce this on the fairly simple attached file. See also attached screenshot for the result tile as generated by mkgmap using both options.
Thanks,
N.
Another great test simple case! But: are you sure that generate-sea=polygon really works? I have tested generate-sea=multipolygon,extends-sea-sectors,close-gaps=5000 and generate-sea=polygon,extends-sea-sectors,close-gaps=5000 but both created the same result displayed on the left in your image. Please post your mkgmap options if you are sure that polygon works for you. WanMil

Another great test simple case! But: are you sure that generate-sea=polygon really works? I have tested generate-sea=multipolygon,extends-sea-sectors,close-gaps=5000 and generate-sea=polygon,extends-sea-sectors,close-gaps=5000 but both created the same result displayed on the left in your image.
Please post your mkgmap options if you are sure that polygon works for you. Hi,
generate-sea=extends-sea-sectors works generate-sea=multipolygon does not I did not even know that you could combine those. Thanks, N.

Another great test simple case! But: are you sure that generate-sea=polygon really works? I have tested generate-sea=multipolygon,extends-sea-sectors,close-gaps=5000 and generate-sea=polygon,extends-sea-sectors,close-gaps=5000 but both created the same result displayed on the left in your image.
Please post your mkgmap options if you are sure that polygon works for you. Hi,
generate-sea=extends-sea-sectors works generate-sea=multipolygon does not
I did not even know that you could combine those.
Thanks,
N.
It's my fault. I edited the wrong config file..... Your results are quite expectable and are correct! multipolygon is set as default for generate-sea. So generate-sea=extend-sea-sectors is interpreted as generate-sea=multipolygon,extend-sea-sectors. Why does generate-sea=multipolygon without extend-sea-sectors not work? The land mass in the south east of the tile does not hit the east tile border. extend-sea-sectors fills the gap between the tile border and the unclosed polygon. If extend-sea-sectors is not defined the polygon is closed in a very poor way which you see on the right in your image. WanMil
participants (3)
-
Marko Mäkelä
-
Nakor
-
WanMil