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

2010-03-31 Thread Toby Speight
0> In article ,
0> Chris-Hein Lunkhusen mailto:chris66...@gmx.de> ("CL") wrote:

CL> I'm a little confused, are you talking about the --generate-sea
CL> option?

Yes - sorry for my little brainfart.  :-)
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


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

2010-03-28 Thread Marko Mäkelä
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 (/|;
}' > "$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
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


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

2010-03-28 Thread Chris-Hein Lunkhusen
Toby Speight schrieb:
> When --generate-coastline=multipolygon fails, I'm left with a map that
> has no distinction between land and sea.  However, if I don't
> use --generate-coastline, I at least get a line (from my style/lines).
> Is there any good reason why generating coastline prevents the line
> rules from being applied to the coastline ways?

Hi,
I'm a little confused, are you talking about the --generate-sea option?

I also noticed the coastline disappearing when using
--generate-sea=extend-sea-sectors and would be glad to
have it again. ;-)

Chris

___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


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

2010-03-25 Thread Marko Mäkelä
25.03.2010 13.14.28, Toby Speight wrote:
> I'll look into enabling logging; last time I did, there was *masses*  
> of output.

I have that too, but I shove the "harmless" or "known" warnings under  
the carpet with a set of regexps.

Some weeks ago, I classified all multipolygon errors that I got for  
Finland, either as "Geofabrik issue" or "splitter issue" or genuine  
problem. Today I got a new multipolygon error that was not filtered by  
my regexps, and it was a genuine error that I fixed. Yesterday I fixed  
an anti-island that someone had added recently. Most of the time, I get  
no warnings through my filter, except for an odd dead-end oneway  
driveway that lacks fixme=continue. (Yes, fixing the roundabouts and  
oneways was a major undertaking.)

Marko
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


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

2010-03-25 Thread Toby Speight
0> In article <1269513322.3023...@x60s>,
0> Marko Mäkelä mailto:marko.mak...@iki.fi> ("Marko") wrote:

Marko> I wanted to say that if you are always generating the same
Marko> region, it should not be that hard to enable the logging and to
Marko> work out from the error messages what the issues are.

Trouble is, it's on and off as people edit the map.  I use Coastline
Checker, but that's not always at the same date as my downloaded
extract.  For example, the error I introduced on Monday and downloaded
on Wednesday, didn't show up on Coastline Checker until Thursday
(today), so I won't pick the fix I've just applied until tomorrow
morning (if I'm lucky).

As I'm going away for the weekend, that's possibly too long a
turnaround time to not have a usable map.

Perhaps Osmosis can selectively update the extract from the server; I
haven't found a way to do that.

I'll look into enabling logging; last time I did, there was *masses* of
output.
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


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

2010-03-25 Thread Marko Mäkelä
24.03.2010 16.35.55, Marko Mäkelä kirjoitti:
> 24.03.2010 16.33.15, Toby Speight kirjoitti:
>> When --generate-coastline=multipolygon fails, I'm left with a map   
>> that has no distinction between land and sea.  However, if I don't   
>> use --generate-coastline, I at least get a line (from my style/   
>> lines). Is there any good reason why generating coastline prevents   
>> the line rules from being applied to the coastline ways?
> 
> Are you generating different maps all the time, or is there some  
> other  reason why you cannot work out the reason why  
> generate-coastline is  failing? I got

Sorry, please disregard this message. I wanted to compose a reply  
yesterday, and apparently my email program saved the draft and decided  
that I want to send it today. :-(

I wanted to say that if you are always generating the same region, it  
should not be that hard to enable the logging and to work out from the  
error messages what the issues are. For example, the Geofabrik extract  
of Finland includes some incomplete natural=coastline islands, and the  
coastline will not reach the map boundary. I fixed these issues with a  
small Perl filter that omits the incomplete ways and moves the  
coastline endpoints to the tile border. You can get my scripts from  
http://www.polkupyoraily.net/osm/.

Best regards,

Marko
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


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

2010-03-25 Thread Marko Mäkelä
24.03.2010 16.33.15, Toby Speight kirjoitti:
> When --generate-coastline=multipolygon fails, I'm left with a map  
> that has no distinction between land and sea.  However, if I don't  
> use --generate-coastline, I at least get a line (from my style/  
> lines). Is there any good reason why generating coastline prevents  
> the line rules from being applied to the coastline ways?

Are you generating different maps all the time, or is there some other  
reason why you cannot work out the reason why generate-coastline is  
failing? I got

> 

> It's not a problem when I actually get sea tiles, but it's a serious
> nuisance when small islands have completely disappeared!
> ___
> 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


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

2010-03-24 Thread Toby Speight
0> In article <20100324151212.64808...@crow>,
0> Mark Burton mailto:ma...@ordern.com> ("Mark") wrote:

Mark> Perhaps this does what you want?
Mark>
Mark> diff --git a/src/uk/me/parabola/mkgmap/reader/osm/xml/Osm5XmlHandler.java 
b/src/uk/me/parabola/mkgmap/reader/osm/xml/Osm5XmlHandler.java

That solves my problem perfectly.

As to the issue with "coastline;cliff", I think that's an instance of a
more general issue with semicolon-separated values, and shouldn't
preclude applying this patch.  Anyone disagree?
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


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

2010-03-24 Thread Mark Burton

Even simpler would be to not delete the natural tag at all and hope
that the sea generation doesn't trash the coastline ways (I can't
remember if it does or not) - those ways that have been tagged
natural=coastline;cliff will still be a problem and perhaps what
happens now is best, i.e. the tag ends up as natural=cliff
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


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

2010-03-24 Thread Mark Burton
On Wed, 24 Mar 2010 14:33:15 +
Toby Speight  wrote:

> When --generate-coastline=multipolygon fails, I'm left with a map that
> has no distinction between land and sea.  However, if I don't
> use --generate-coastline, I at least get a line (from my style/lines).
> Is there any good reason why generating coastline prevents the line
> rules from being applied to the coastline ways?
> 
> It's not a problem when I actually get sea tiles, but it's a serious
> nuisance when small islands have completely disappeared!
> ___
> mkgmap-dev mailing list
> mkgmap-dev@lists.mkgmap.org.uk
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Perhaps this does what you want?

diff --git a/src/uk/me/parabola/mkgmap/reader/osm/xml/Osm5XmlHandler.java 
b/src/uk/me/parabola/mkgmap/reader/osm/xml/Osm5XmlHandler.java
index 0b150ef..8d40da2 100644
--- a/src/uk/me/parabola/mkgmap/reader/osm/xml/Osm5XmlHandler.java
+++ b/src/uk/me/parabola/mkgmap/reader/osm/xml/Osm5XmlHandler.java
@@ -531,8 +531,9 @@ public class Osm5XmlHandler extends DefaultHandler {
String natural = 
currentWay.getTag("natural");
if(natural != null) {
if("coastline".equals(natural)) 
{
-   
currentWay.deleteTag("natural");
-   
shoreline.add(currentWay);
+   Way w = 
currentWay.copy();
+   w.deleteTag("natural");
+   shoreline.add(w);
}
else if(natural.contains(";")) {
// cope with compound 
tag value
@@ -547,10 +548,11 @@ public class Osm5XmlHandler extends DefaultHandler {
others 
+= ";" + n;
}
if(foundCoastline) {
-   
currentWay.deleteTag("natural");
+   Way w = 
currentWay.copy();
+   
w.deleteTag("natural");
if(others != 
null)
-   
currentWay.addTag("natural", others);
-   
shoreline.add(currentWay);
+   
w.addTag("natural", others);
+   
shoreline.add(w);
}
}
}
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


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

2010-03-24 Thread charlie
Toby Speight (t.m.speight...@cantab.net) wrote:

> When --generate-coastline=multipolygon fails, I'm left with a map that
> has no distinction between land and sea.  However, if I don't
> use --generate-coastline, I at least get a line (from my style/lines).
> Is there any good reason why generating coastline prevents the line
> rules from being applied to the coastline ways?
>
> It's not a problem when I actually get sea tiles, but it's a serious
> nuisance when small islands have completely disappeared!

Seconded.  It would be visually useful to retain the coastline even  
when --generate-coastline works fine, as it's nice to see a solid line  
twixt land and sea.

-- 
Charlie

___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


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

2010-03-24 Thread Toby Speight
When --generate-coastline=multipolygon fails, I'm left with a map that
has no distinction between land and sea.  However, if I don't
use --generate-coastline, I at least get a line (from my style/lines).
Is there any good reason why generating coastline prevents the line
rules from being applied to the coastline ways?

It's not a problem when I actually get sea tiles, but it's a serious
nuisance when small islands have completely disappeared!
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev