
Hi, I have not used precomp sea before and am struggling to compile the sea tiles. Using the following process I get a map with no sea: Used osmfilter to extract just the coastline data Used splitter on the coastline data Used mkgmap on the splitter data with a simple style that just processes coastline and with --generate-sea=multipolygon. I can see some img files created in my sea folder Used splitter again on the original data Used mkgmap again with --precomp-sea and --generate-sea=multipolygon Am I doing something wrong? Regards, Mike

Hi Mike, not sure what you are trying to do. What do you expect to get with the last command? Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Mike Baggaley <mike@tvage.co.uk> Gesendet: Mittwoch, 29. Januar 2020 19:20 An: 'Development list for mkgmap' Betreff: [mkgmap-dev] precompiled sea Hi, I have not used precomp sea before and am struggling to compile the sea tiles. Using the following process I get a map with no sea: Used osmfilter to extract just the coastline data Used splitter on the coastline data Used mkgmap on the splitter data with a simple style that just processes coastline and with --generate-sea=multipolygon. I can see some img files created in my sea folder Used splitter again on the original data Used mkgmap again with --precomp-sea and --generate-sea=multipolygon Am I doing something wrong? Regards, Mike _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Mike, if you want to compile your own sea.zip see https://wiki.openstreetmap.org/wiki/Mkgmap/help/options#Using_precompiled_se... If you want to create a map similar to that created with java -jar mkgmap.jar --generate-sea=multipolygon --style-file=styles\coastline -c template.args you have to use something like java -jar mkgmap.jar --precomp-sea=\osm\sea.zip --style-file=styles\coastline -c template.args Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Gerd Petermann <gpetermann_muenchen@hotmail.com> Gesendet: Mittwoch, 29. Januar 2020 20:22 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] precompiled sea Hi Mike, not sure what you are trying to do. What do you expect to get with the last command? Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Mike Baggaley <mike@tvage.co.uk> Gesendet: Mittwoch, 29. Januar 2020 19:20 An: 'Development list for mkgmap' Betreff: [mkgmap-dev] precompiled sea Hi, I have not used precomp sea before and am struggling to compile the sea tiles. Using the following process I get a map with no sea: Used osmfilter to extract just the coastline data Used splitter on the coastline data Used mkgmap on the splitter data with a simple style that just processes coastline and with --generate-sea=multipolygon. I can see some img files created in my sea folder Used splitter again on the original data Used mkgmap again with --precomp-sea and --generate-sea=multipolygon Am I doing something wrong? Regards, Mike _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Gerd, having now read your link on generating sea yourself, I gather that mkgmap cannot produce precompiled sea from OSM files, only from ESRI files. I also wasn't aware that optional code had to be included to use the sea generator. I could include the optional code in my mkgmap build, but it looks like using precompiled sea is a non-starter for me if it can't read OSM data. The original source of my land/sea border was ESRI, but this data has gone through a filtering process and been converted to OSM format. I had assumed that the precompiled sea tiles were in img format, but from opening the precompiled sea zip file from the download page, I see the files are pbf, suggesting that 'precompiled' is something of a misnomer if they are just OSM files. I assume it refers to converting from ESRI to OSM, which I don't need, as it looks like it is doing something pretty similar to what I already have. Ah well, back to the drawing board... Cheers, Mike -----Original Message----- From: Gerd Petermann [mailto:gpetermann_muenchen@hotmail.com] Sent: 29 January 2020 20:12 To: Development list for mkgmap <mkgmap-dev@lists.mkgmap.org.uk> Subject: Re: [mkgmap-dev] precompiled sea Hi Mike, if you want to compile your own sea.zip see https://wiki.openstreetmap.org/wiki/Mkgmap/help/options#Using_precompiled_se a If you want to create a map similar to that created with java -jar mkgmap.jar --generate-sea=multipolygon --style-file=styles\coastline -c template.args you have to use something like java -jar mkgmap.jar --precomp-sea=\osm\sea.zip --style-file=styles\coastline -c template.args Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Gerd Petermann <gpetermann_muenchen@hotmail.com> Gesendet: Mittwoch, 29. Januar 2020 20:22 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] precompiled sea Hi Mike, not sure what you are trying to do. What do you expect to get with the last command? Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Mike Baggaley <mike@tvage.co.uk> Gesendet: Mittwoch, 29. Januar 2020 19:20 An: 'Development list for mkgmap' Betreff: [mkgmap-dev] precompiled sea Hi, I have not used precomp sea before and am struggling to compile the sea tiles. Using the following process I get a map with no sea: Used osmfilter to extract just the coastline data Used splitter on the coastline data Used mkgmap on the splitter data with a simple style that just processes coastline and with --generate-sea=multipolygon. I can see some img files created in my sea folder Used splitter again on the original data Used mkgmap again with --precomp-sea and --generate-sea=multipolygon Am I doing something wrong? Regards, Mike _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Mike, quite a lot of missunderstandings ;) 1) The data in land-polygons-split-4326.zip is calculated (compiled) from OSM coastline data. AFAIK the same data is used by the renderer of https://www.openstreetmap.org Find more details here https://osmdata.openstreetmap.de/data/land-polygons.html The expected avantage is that the coastline data produced by them is complete and correct (no gaps, no reversed coastline) 2) The data in sea.zip uses the OSM pbf format. It containes the result of processing this (hopefully correct) data using the algorithm that is used with --generate-sea=multipolygon. That's also a reason why it is called pre-compiled. 3) You should load the data of a rather small sea*.pbf file into JOSM to sea what it contains. You'll sea the result of "cutting out holes(islands) of a multipolygon". So, the file contains only simple ways, no multipolygons. If you don't want or cannot use precompiled sea data you should try the sub options of --generate-sea. Gerd PS: See also my trick regarding testing sea: http://gis.19327.n8.nabble.com/precomp-sea-problem-tp5953261p5953281.html ________________________________________ Von: Mike Baggaley <mike@tvage.co.uk> Gesendet: Donnerstag, 30. Januar 2020 00:24 An: 'Gerd Petermann'; 'Development list for mkgmap' Betreff: RE: [mkgmap-dev] precompiled sea Hi Gerd, having now read your link on generating sea yourself, I gather that mkgmap cannot produce precompiled sea from OSM files, only from ESRI files. I also wasn't aware that optional code had to be included to use the sea generator. I could include the optional code in my mkgmap build, but it looks like using precompiled sea is a non-starter for me if it can't read OSM data. The original source of my land/sea border was ESRI, but this data has gone through a filtering process and been converted to OSM format. I had assumed that the precompiled sea tiles were in img format, but from opening the precompiled sea zip file from the download page, I see the files are pbf, suggesting that 'precompiled' is something of a misnomer if they are just OSM files. I assume it refers to converting from ESRI to OSM, which I don't need, as it looks like it is doing something pretty similar to what I already have. Ah well, back to the drawing board... Cheers, Mike -----Original Message----- From: Gerd Petermann [mailto:gpetermann_muenchen@hotmail.com] Sent: 29 January 2020 20:12 To: Development list for mkgmap <mkgmap-dev@lists.mkgmap.org.uk> Subject: Re: [mkgmap-dev] precompiled sea Hi Mike, if you want to compile your own sea.zip see https://wiki.openstreetmap.org/wiki/Mkgmap/help/options#Using_precompiled_se a If you want to create a map similar to that created with java -jar mkgmap.jar --generate-sea=multipolygon --style-file=styles\coastline -c template.args you have to use something like java -jar mkgmap.jar --precomp-sea=\osm\sea.zip --style-file=styles\coastline -c template.args Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Gerd Petermann <gpetermann_muenchen@hotmail.com> Gesendet: Mittwoch, 29. Januar 2020 20:22 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] precompiled sea Hi Mike, not sure what you are trying to do. What do you expect to get with the last command? Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Mike Baggaley <mike@tvage.co.uk> Gesendet: Mittwoch, 29. Januar 2020 19:20 An: 'Development list for mkgmap' Betreff: [mkgmap-dev] precompiled sea Hi, I have not used precomp sea before and am struggling to compile the sea tiles. Using the following process I get a map with no sea: Used osmfilter to extract just the coastline data Used splitter on the coastline data Used mkgmap on the splitter data with a simple style that just processes coastline and with --generate-sea=multipolygon. I can see some img files created in my sea folder Used splitter again on the original data Used mkgmap again with --precomp-sea and --generate-sea=multipolygon Am I doing something wrong? Regards, Mike _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Gerd, up to now I have built my UK map with the sea and land in a single pass using --generate-sea. However, some tiles are getting the sea and land inverted, typically where a very small amount of sea is in the tile. I was trying to see whether if I precompiled the sea, the problem would go away - I was assuming the tiles of precompiled sea would be bigger because they contained no other data, so the probability of inversion would be reduced. I was therefore first trying to generate precompiled sea, then use it to build my UK map. It may be that my assumption is incorrect and that it won't make any difference anyway. Regards, Mike -----Original Message----- From: Gerd Petermann [mailto:gpetermann_muenchen@hotmail.com] Sent: 29 January 2020 19:22 To: Development list for mkgmap <mkgmap-dev@lists.mkgmap.org.uk> Subject: Re: [mkgmap-dev] precompiled sea Hi Mike, not sure what you are trying to do. What do you expect to get with the last command? Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Mike Baggaley <mike@tvage.co.uk> Gesendet: Mittwoch, 29. Januar 2020 19:20 An: 'Development list for mkgmap' Betreff: [mkgmap-dev] precompiled sea Hi, I have not used precomp sea before and am struggling to compile the sea tiles. Using the following process I get a map with no sea: Used osmfilter to extract just the coastline data Used splitter on the coastline data Used mkgmap on the splitter data with a simple style that just processes coastline and with --generate-sea=multipolygon. I can see some img files created in my sea folder Used splitter again on the original data Used mkgmap again with --precomp-sea and --generate-sea=multipolygon Am I doing something wrong? Regards, Mike _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Having just generated full britain-and-ireland with current trunk (r4432), I'm also now seeing some tiles (5 out of 101) with sea/land flipped when using option: --generate-sea="multipolygon,extend-sea-sectors,close-gaps=350" but when I process some of the same tiles with r4295 they are OK. It's not a problem for me at the moment, I've simply replaced above with --precomp-sea=sea-latest.zip However I prefer to use --generate-sea for various reasons: - saves downloading sea.zip every now and again. - island cut-outs match land features exactly, whereas there were slight differences with sea.zip. - not had these problems before. - no noticeable performance problems. Sometime I'll try and pin down when the change happened. I hadn't noticed before because the tiles in the small map I use day-to-day don't show the problem. Ticker On Wed, 2020-01-29 at 22:50 +0000, Mike Baggaley wrote:
Hi Gerd, up to now I have built my UK map with the sea and land in a single pass using --generate-sea. However, some tiles are getting the sea and land inverted, typically where a very small amount of sea is in the tile. I was trying to see whether if I precompiled the sea, the problem would go away - I was assuming the tiles of precompiled sea would be bigger because they contained no other data, so the probability of inversion would be reduced. I was therefore first trying to generate precompiled sea, then use it to build my UK map. It may be that my assumption is incorrect and that it won't make any difference anyway.
Regards, Mike
-----Original Message----- From: Gerd Petermann [mailto:gpetermann_muenchen@hotmail.com] Sent: 29 January 2020 19:22 To: Development list for mkgmap <mkgmap-dev@lists.mkgmap.org.uk> Subject: Re: [mkgmap-dev] precompiled sea
Hi Mike,
not sure what you are trying to do. What do you expect to get with the last command?
Gerd
________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Mike Baggaley <mike@tvage.co.uk> Gesendet: Mittwoch, 29. Januar 2020 19:20 An: 'Development list for mkgmap' Betreff: [mkgmap-dev] precompiled sea
Hi, I have not used precomp sea before and am struggling to compile the sea tiles. Using the following process I get a map with no sea:
Used osmfilter to extract just the coastline data Used splitter on the coastline data Used mkgmap on the splitter data with a simple style that just processes coastline and with --generate-sea=multipolygon. I can see some img files created in my sea folder Used splitter again on the original data Used mkgmap again with --precomp-sea and --generate-sea=multipolygon
Am I doing something wrong?
Regards, Mike
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Gerd, Mike Considering --generate-sea=... and SeaGenerator.java. Following changes around r4381, many more tiles have land/sea flipped, and, looking at the log files, MultiPolygonRelation gives errors for the sea relation, complaining about inner polygons being in inner polygons etc. The code relating to extracting polygons from the coastline doesn't seem to understand what it is doing regarding the change in behaviour between land polygons on a sea tile and vice-versa and I have little confidence in its ability to handle complex coastlines. So, I've re-written the guts of it to fix these shortcomings. I haven't touched the "floodblocker" code, which I think should be decommissioned. Patch attached. There are a few other aspects that to this code that I think could be improved. Ticker On Thu, 2020-01-30 at 11:35 +0000, Ticker Berkin wrote:
Hi
Having just generated full britain-and-ireland with current trunk (r4432), I'm also now seeing some tiles (5 out of 101) with sea/land flipped when using option: --generate-sea="multipolygon,extend-sea-sectors,close-gaps=350" but when I process some of the same tiles with r4295 they are OK.
It's not a problem for me at the moment, I've simply replaced above with --precomp-sea=sea-latest.zip
However I prefer to use --generate-sea for various reasons: - saves downloading sea.zip every now and again. - island cut-outs match land features exactly, whereas there were slight differences with sea.zip. - not had these problems before. - no noticeable performance problems.
Sometime I'll try and pin down when the change happened. I hadn't noticed before because the tiles in the small map I use day-to-day don't show the problem.
Ticker
On Wed, 2020-01-29 at 22:50 +0000, Mike Baggaley wrote:
Hi Gerd, up to now I have built my UK map with the sea and land in a single pass using --generate-sea. However, some tiles are getting the sea and land inverted, typically where a very small amount of sea is in the tile. I was trying to see whether if I precompiled the sea, the problem would go away - I was assuming the tiles of precompiled sea would be bigger because they contained no other data, so the probability of inversion would be reduced. I was therefore first trying to generate precompiled sea, then use it to build my UK map. It may be that my assumption is incorrect and that it won't make any difference anyway.
Regards, Mike

Hi Ticker, thanks for the patch. Do you have an example file that shows how 4381 introduced new problems which are now solved? Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Ticker Berkin <rwb-mkgmap@jagit.co.uk> Gesendet: Dienstag, 17. März 2020 17:40 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] precompiled sea Hi Gerd, Mike Considering --generate-sea=... and SeaGenerator.java. Following changes around r4381, many more tiles have land/sea flipped, and, looking at the log files, MultiPolygonRelation gives errors for the sea relation, complaining about inner polygons being in inner polygons etc. The code relating to extracting polygons from the coastline doesn't seem to understand what it is doing regarding the change in behaviour between land polygons on a sea tile and vice-versa and I have little confidence in its ability to handle complex coastlines. So, I've re-written the guts of it to fix these shortcomings. I haven't touched the "floodblocker" code, which I think should be decommissioned. Patch attached. There are a few other aspects that to this code that I think could be improved. Ticker On Thu, 2020-01-30 at 11:35 +0000, Ticker Berkin wrote:
Hi
Having just generated full britain-and-ireland with current trunk (r4432), I'm also now seeing some tiles (5 out of 101) with sea/land flipped when using option: --generate-sea="multipolygon,extend-sea-sectors,close-gaps=350" but when I process some of the same tiles with r4295 they are OK.
It's not a problem for me at the moment, I've simply replaced above with --precomp-sea=sea-latest.zip
However I prefer to use --generate-sea for various reasons: - saves downloading sea.zip every now and again. - island cut-outs match land features exactly, whereas there were slight differences with sea.zip. - not had these problems before. - no noticeable performance problems.
Sometime I'll try and pin down when the change happened. I hadn't noticed before because the tiles in the small map I use day-to-day don't show the problem.
Ticker
On Wed, 2020-01-29 at 22:50 +0000, Mike Baggaley wrote:
Hi Gerd, up to now I have built my UK map with the sea and land in a single pass using --generate-sea. However, some tiles are getting the sea and land inverted, typically where a very small amount of sea is in the tile. I was trying to see whether if I precompiled the sea, the problem would go away - I was assuming the tiles of precompiled sea would be bigger because they contained no other data, so the probability of inversion would be reduced. I was therefore first trying to generate precompiled sea, then use it to build my UK map. It may be that my assumption is incorrect and that it won't make any difference anyway.
Regards, Mike

Hi Ticker, forget it. Found an older extract of Ireland which shows the error with r4382, but not with r4380 or with your patch. I just want to understand how the changes in 4381 changed this before committing your patch... Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Gerd Petermann <gpetermann_muenchen@hotmail.com> Gesendet: Mittwoch, 18. März 2020 07:41 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] precompiled sea Hi Ticker, thanks for the patch. Do you have an example file that shows how 4381 introduced new problems which are now solved? Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Ticker Berkin <rwb-mkgmap@jagit.co.uk> Gesendet: Dienstag, 17. März 2020 17:40 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] precompiled sea Hi Gerd, Mike Considering --generate-sea=... and SeaGenerator.java. Following changes around r4381, many more tiles have land/sea flipped, and, looking at the log files, MultiPolygonRelation gives errors for the sea relation, complaining about inner polygons being in inner polygons etc. The code relating to extracting polygons from the coastline doesn't seem to understand what it is doing regarding the change in behaviour between land polygons on a sea tile and vice-versa and I have little confidence in its ability to handle complex coastlines. So, I've re-written the guts of it to fix these shortcomings. I haven't touched the "floodblocker" code, which I think should be decommissioned. Patch attached. There are a few other aspects that to this code that I think could be improved. Ticker On Thu, 2020-01-30 at 11:35 +0000, Ticker Berkin wrote:
Hi
Having just generated full britain-and-ireland with current trunk (r4432), I'm also now seeing some tiles (5 out of 101) with sea/land flipped when using option: --generate-sea="multipolygon,extend-sea-sectors,close-gaps=350" but when I process some of the same tiles with r4295 they are OK.
It's not a problem for me at the moment, I've simply replaced above with --precomp-sea=sea-latest.zip
However I prefer to use --generate-sea for various reasons: - saves downloading sea.zip every now and again. - island cut-outs match land features exactly, whereas there were slight differences with sea.zip. - not had these problems before. - no noticeable performance problems.
Sometime I'll try and pin down when the change happened. I hadn't noticed before because the tiles in the small map I use day-to-day don't show the problem.
Ticker
On Wed, 2020-01-29 at 22:50 +0000, Mike Baggaley wrote:
Hi Gerd, up to now I have built my UK map with the sea and land in a single pass using --generate-sea. However, some tiles are getting the sea and land inverted, typically where a very small amount of sea is in the tile. I was trying to see whether if I precompiled the sea, the problem would go away - I was assuming the tiles of precompiled sea would be bigger because they contained no other data, so the probability of inversion would be reduced. I was therefore first trying to generate precompiled sea, then use it to build my UK map. It may be that my assumption is incorrect and that it won't make any difference anyway.
Regards, Mike
mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Ticker, OK, my results: The refactoring in r4382 introduced two bugs. With the partial revert in r4391 both bugs were fixed. With r4392 one bug was re-introduced. :( I've attached a small patch for that. Now I wonder if your longer patch fixes any other issues? Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Gerd Petermann <gpetermann_muenchen@hotmail.com> Gesendet: Mittwoch, 18. März 2020 08:14 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] precompiled sea Hi Ticker, forget it. Found an older extract of Ireland which shows the error with r4382, but not with r4380 or with your patch. I just want to understand how the changes in 4381 changed this before committing your patch... Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Gerd Petermann <gpetermann_muenchen@hotmail.com> Gesendet: Mittwoch, 18. März 2020 07:41 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] precompiled sea Hi Ticker, thanks for the patch. Do you have an example file that shows how 4381 introduced new problems which are now solved? Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Ticker Berkin <rwb-mkgmap@jagit.co.uk> Gesendet: Dienstag, 17. März 2020 17:40 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] precompiled sea Hi Gerd, Mike Considering --generate-sea=... and SeaGenerator.java. Following changes around r4381, many more tiles have land/sea flipped, and, looking at the log files, MultiPolygonRelation gives errors for the sea relation, complaining about inner polygons being in inner polygons etc. The code relating to extracting polygons from the coastline doesn't seem to understand what it is doing regarding the change in behaviour between land polygons on a sea tile and vice-versa and I have little confidence in its ability to handle complex coastlines. So, I've re-written the guts of it to fix these shortcomings. I haven't touched the "floodblocker" code, which I think should be decommissioned. Patch attached. There are a few other aspects that to this code that I think could be improved. Ticker On Thu, 2020-01-30 at 11:35 +0000, Ticker Berkin wrote:
Hi
Having just generated full britain-and-ireland with current trunk (r4432), I'm also now seeing some tiles (5 out of 101) with sea/land flipped when using option: --generate-sea="multipolygon,extend-sea-sectors,close-gaps=350" but when I process some of the same tiles with r4295 they are OK.
It's not a problem for me at the moment, I've simply replaced above with --precomp-sea=sea-latest.zip
However I prefer to use --generate-sea for various reasons: - saves downloading sea.zip every now and again. - island cut-outs match land features exactly, whereas there were slight differences with sea.zip. - not had these problems before. - no noticeable performance problems.
Sometime I'll try and pin down when the change happened. I hadn't noticed before because the tiles in the small map I use day-to-day don't show the problem.
Ticker
On Wed, 2020-01-29 at 22:50 +0000, Mike Baggaley wrote:
Hi Gerd, up to now I have built my UK map with the sea and land in a single pass using --generate-sea. However, some tiles are getting the sea and land inverted, typically where a very small amount of sea is in the tile. I was trying to see whether if I precompiled the sea, the problem would go away - I was assuming the tiles of precompiled sea would be bigger because they contained no other data, so the probability of inversion would be reduced. I was therefore first trying to generate precompiled sea, then use it to build my UK map. It may be that my assumption is incorrect and that it won't make any difference anyway.
Regards, Mike
mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Ticker, I finally understood what was wrong in the addCorners() method, so this patch shows the minimal change to make it work. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Gerd Petermann <gpetermann_muenchen@hotmail.com> Gesendet: Mittwoch, 18. März 2020 11:05 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] precompiled sea Hi Ticker, OK, my results: The refactoring in r4382 introduced two bugs. With the partial revert in r4391 both bugs were fixed. With r4392 one bug was re-introduced. :( I've attached a small patch for that. Now I wonder if your longer patch fixes any other issues? Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Gerd Petermann <gpetermann_muenchen@hotmail.com> Gesendet: Mittwoch, 18. März 2020 08:14 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] precompiled sea Hi Ticker, forget it. Found an older extract of Ireland which shows the error with r4382, but not with r4380 or with your patch. I just want to understand how the changes in 4381 changed this before committing your patch... Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Gerd Petermann <gpetermann_muenchen@hotmail.com> Gesendet: Mittwoch, 18. März 2020 07:41 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] precompiled sea Hi Ticker, thanks for the patch. Do you have an example file that shows how 4381 introduced new problems which are now solved? Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Ticker Berkin <rwb-mkgmap@jagit.co.uk> Gesendet: Dienstag, 17. März 2020 17:40 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] precompiled sea Hi Gerd, Mike Considering --generate-sea=... and SeaGenerator.java. Following changes around r4381, many more tiles have land/sea flipped, and, looking at the log files, MultiPolygonRelation gives errors for the sea relation, complaining about inner polygons being in inner polygons etc. The code relating to extracting polygons from the coastline doesn't seem to understand what it is doing regarding the change in behaviour between land polygons on a sea tile and vice-versa and I have little confidence in its ability to handle complex coastlines. So, I've re-written the guts of it to fix these shortcomings. I haven't touched the "floodblocker" code, which I think should be decommissioned. Patch attached. There are a few other aspects that to this code that I think could be improved. Ticker On Thu, 2020-01-30 at 11:35 +0000, Ticker Berkin wrote:
Hi
Having just generated full britain-and-ireland with current trunk (r4432), I'm also now seeing some tiles (5 out of 101) with sea/land flipped when using option: --generate-sea="multipolygon,extend-sea-sectors,close-gaps=350" but when I process some of the same tiles with r4295 they are OK.
It's not a problem for me at the moment, I've simply replaced above with --precomp-sea=sea-latest.zip
However I prefer to use --generate-sea for various reasons: - saves downloading sea.zip every now and again. - island cut-outs match land features exactly, whereas there were slight differences with sea.zip. - not had these problems before. - no noticeable performance problems.
Sometime I'll try and pin down when the change happened. I hadn't noticed before because the tiles in the small map I use day-to-day don't show the problem.
Ticker
On Wed, 2020-01-29 at 22:50 +0000, Mike Baggaley wrote:
Hi Gerd, up to now I have built my UK map with the sea and land in a single pass using --generate-sea. However, some tiles are getting the sea and land inverted, typically where a very small amount of sea is in the tile. I was trying to see whether if I precompiled the sea, the problem would go away - I was assuming the tiles of precompiled sea would be bigger because they contained no other data, so the probability of inversion would be reduced. I was therefore first trying to generate precompiled sea, then use it to build my UK map. It may be that my assumption is incorrect and that it won't make any difference anyway.
Regards, Mike
mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Gerd The version in my patch is simpler and works for both createLandPolygons and createSeaPolygons (both contain a subtle "+= 4") Ticker On Wed, 2020-03-18 at 10:26 +0000, Gerd Petermann wrote:
Hi Ticker,
I finally understood what was wrong in the addCorners() method, so this patch shows the minimal change to make it work.
Gerd

Hi Gerd I was just going through the code and this is what I had so far: The significant changes are in createInnerWays/createLandPolygons r4389 createInnerWays extracts land/anticlockwise/islands from the hitMap. It has some logical mistakes like a 50% chance of putting an erroneous start/end point on an earlier edge from where the real land is cut by the tile bounds; this is like a spike, but possibly going round 3 corners and back! Then, unless the only shoreline is an enclosed sea (Caspian/Black/Dead/...?) or there are sea-sectors, it will generated a sea background and MP.cutout all the land. Otherwise it generates a land background with this as the MP relation inner but probably no outers unless there are sea-sectors. r4392 has similar behaviour and I was just getting to the bit that you've found where addCorners needed fixing. My version simplifies and fixes createLandPolygons and addCorners. It also has other improvements: If the tile doesn't have any real islands, make it land based and have any encroaching sea as sea polygons. If using option sea-sectors: - Put the triangles on the correct side of the coastline rather than the 50% chance it had before. - Don't force the background to land as an "inner" of the triangles "outer" - rather, if tile is land, show sea-triangle on the sea-side, if the background is sea, show a land-triangle on the land-side. There are a few other minor fixes and tidy-ups Ticker On Wed, 2020-03-18 at 10:05 +0000, Gerd Petermann wrote:
Hi Ticker,
OK, my results: The refactoring in r4382 introduced two bugs. With the partial revert in r4391 both bugs were fixed. With r4392 one bug was re-introduced. :( I've attached a small patch for that.
Now I wonder if your longer patch fixes any other issues?
Gerd
participants (3)
-
Gerd Petermann
-
Mike Baggaley
-
Ticker Berkin