logo separator

[mkgmap-dev] Generate coastline - can we keep the coastline way?

From Marko Mäkelä marko.makela at iki.fi on Sun Mar 28 15:07:42 BST 2010

On Sun, Mar 28, 2010 at 02:26:04PM +0200, Chris-Hein Lunkhusen wrote:
> I also noticed the coastline disappearing when using
> --generate-sea=extend-sea-sectors and would be glad to
> have it again. ;-)

Can you fake the coastline by moving the end nodes of your map extract
to the tile borders, like I do:

bzip2 -dc "$OSM_BZ2"|
perl -e \
'my $del=0;
while(<>){
    $del=1 if (/<way id="(4581(437|716|666)|461(1822|076[56]))|22877669"/);
    s/(<node id="28954629".*lat=)"60\.51542"/$1"59.414063"/;
    s/(<node id="29193143".*lon=)"24\.12826"/$1"19.116211"/;
    print unless $del;
    $del=0 if m|</way>|;
}' > "$OSM"

The script deletes some incomplete islands from the Geofabrik finland.osm.bz2
and moves the end nodes of the mainland coastline to the rectangular tile
borders.  Before this solution, I tried to "glue" some coastline to the
Geofabrik extract with osmosis --merge, but that apparently failed for
some reason.

	Marko



More information about the mkgmap-dev mailing list