Re: [mkgmap-dev] mkgmap and values with semicolon in it

2011-02-24 Thread Thorsten Kukuk
On Thu, Feb 24, Felix Hartmann wrote:

> I think the best approach would be to cut values of any keys/tags but 
> name and ref (or having "name" or "ref" as part of their key ) at the 
> semicolon for the lines and polygons file.
> 
> As for the points file all values with ";" should be seperated and 
> cloned. So for amenity=hotel;restaurant & name=abc create two POI one 
> matching all rules of amenity=restaurant and the second matching all 
> rules amenity=hotel.

Yes, I think that's the correct solution.

> Still everyone using semicolons should know that this tagging is 
> potentially complicated and not usable and using semicolons is not good 
> form of tagging.

The problem is that the current OSM API does not allow the
same key twice for a point. So there is no other possibility
then to use the ";". From what I found out with google, using
";" is more or less the official solution for this.

  Thorsten

-- 
Thorsten Kukuk, Project Manager/Release Manager SLES
SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg
GF: Markus Rex, HRB 16746 (AG Nuernberg)
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


Re: [mkgmap-dev] mkgmap and values with semicolon in it

2011-02-24 Thread Thorsten Kukuk
On Thu, Feb 24, WanMil wrote:

> > Hi,
> >
> > I haven't found anything about this beside a very old mail,
> > that mkgmap does not support it.
> > There are several entries with key=value1;value2, means there
> > are several values with a semicolon seperated.
> > All this entries are missing in my created map, so I assume
> > that this still does not work? Or should it be?
> >
> > One of my rules for example is:
> > amenity=vending_machine&  (vending=parcel_pickup | vending=parcel_mail_in) 
> > ..
> >
> > The entries with:
> > amenity=vending_machine
> > vending=parcel_pickup
> >
> > or
> >
> > amenity=vending_machine
> > vending=parcel_mail_in
> >
> > are rendered, but all points with:
> >
> > amenity=vending_machine
> > vending=parcel_pickup;parcel_mail_in
> >
> > are not. Can mkgmap really not handle that? Is there any
> > workaround?
> >
> >Thanks,
> > Thorsten
> >
> 
> Thorsten,
> 
> what would you expect?
> - Two POIs at the same location?
> - One POI at the same location?
> - Two POIs at the same location if the two tags will be assigned with 
> different garmin ids and one POI if will be assigned with same garmin id?

My expectation is that mkgmap handles "vending=parcel_pickup;parcel_mail_in"
in the same way as if there are two tags:
"vending=parcel_pickup"
and
"vending=parcel_mail_in"

If there are one or two POIs at the same location would
depend on the rules in the style file. As of today, where you
can put two POIs at the same location, too.

Currently there is a mismatch between what the OSM API 0.6
allows/requires and mkgmap makes out of them. And I don't think
that rewriting all rules in something like "key~'.*value*.' is a
good idea.

  Thorsten

-- 
Thorsten Kukuk, Project Manager/Release Manager SLES
SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg
GF: Markus Rex, HRB 16746 (AG Nuernberg)
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


Re: [mkgmap-dev] mkgmap and values with semicolon in it

2011-02-24 Thread Henning Scholland
Hi
> I think the best approach would be to cut values of any keys/tags but
> name and ref (or having "name" or "ref" as part of their key ) at the
> semicolon for the lines and polygons file.
>
> As for the points file all values with ";" should be seperated and
> cloned. So for amenity=hotel;restaurant&  name=abc create two POI one
> matching all rules of amenity=restaurant and the second matching all
> rules amenity=hotel.
>
> Still everyone using semicolons should know that this tagging is
> potentially complicated and not usable and using semicolons is not good
> form of tagging.
+1
Seems to be a good proposal!

Henning

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


Re: [mkgmap-dev] mkgmap and values with semicolon in it

2011-02-24 Thread Bennie du Plessis

to add to my previous post:
if you want two points:

amenity=vending_machine&  vending~'.*parcel_pickup.*' [0x3006 resolution 18 
continue]

amenity=vending_machine&  vending~'.*parcel_mail_in.*' [0x3006 resolution 18]

if you want one point, I wonder if the following will work?

amenity=vending_machine&  vending~'.*parcel_mail_in.*'&  
vending~'.*parcel_pickup.*'  {set name=Parcel_in_out}[0x3006 resolution 18]

for someone who knows so little, I'm talking way too much now

BennieD



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

Re: [mkgmap-dev] mkgmap and values with semicolon in it

2011-02-24 Thread Felix Hartmann
I think the best approach would be to cut values of any keys/tags but 
name and ref (or having "name" or "ref" as part of their key ) at the 
semicolon for the lines and polygons file.

As for the points file all values with ";" should be seperated and 
cloned. So for amenity=hotel;restaurant & name=abc create two POI one 
matching all rules of amenity=restaurant and the second matching all 
rules amenity=hotel.

Still everyone using semicolons should know that this tagging is 
potentially complicated and not usable and using semicolons is not good 
form of tagging.

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


Re: [mkgmap-dev] mkgmap and values with semicolon in it

2011-02-24 Thread Bennie du Plessis

Thorsten,
I'm not very good at this,
but had a similar problem that was solved by something like:
amenity=vending_machine&  vending~'.*parcel.*' [0x3006 resolution 18]

I believe vending~'.*parcel.*' means
the vending tag contains the word parcel,
but I think the rule has to start with a regular expression like
"amenity=vending_machine"

Hope I'm not totally off base here

BennieD

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

Re: [mkgmap-dev] [index] Automatic location completion

2011-02-24 Thread WanMil
> Hi
>>> if you just want to complete addr:*-tag, it's good to use addr:* prefix.
>> I don't understand. Where should I use the addr:* prefix?
>
> addr-tags are used to display the address of an object. If you just want
> to complete existing objects with tags from relations, then addr:*
> should be ok. But If you want to create new objects e.g. all streets
> with addr-tags, this would make it impossible to keep them separate from
> the original objects with addresses.
>
> I think using only existing objects, wont be useful, because there isn't
> a high density of address-objects to have enough points for linking with
> streets.
>
> So it would be better to use relations to put tags to all streets in a
> form like
> mkgmap:city=
> mkgmap:district=
> mkgmap:state=
> mkgmap:country=
>
> Also it would be useful to set an global default for each of these tags
> in mkgmap-call, because it could be possible, that there isn't any
> country relation in an extract.
>
> Henning
>

That's a good reason to use a separate tagging scheme for the location 
completion information. I'l put it on my todo list.

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


Re: [mkgmap-dev] mkgmap and values with semicolon in it

2011-02-24 Thread Henning Scholland
Am 24.02.2011 21:55, schrieb WanMil:
> what would you expect?
> - Two POIs at the same location?
> - One POI at the same location?
> - Two POIs at the same location if the two tags will be assigned with
> different garmin ids and one POI if will be assigned with same garmin id?
But be careful...there are also tags like surface=grass;asphalt at some 
streets or other tags with opposed meaning.

Henning

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


Re: [mkgmap-dev] [index] Automatic location completion

2011-02-24 Thread Henning Scholland
Hi
>> if you just want to complete addr:*-tag, it's good to use addr:* prefix.
> I don't understand. Where should I use the addr:* prefix?

addr-tags are used to display the address of an object. If you just want 
to complete existing objects with tags from relations, then addr:* 
should be ok. But If you want to create new objects e.g. all streets 
with addr-tags, this would make it impossible to keep them separate from 
the original objects with addresses.

I think using only existing objects, wont be useful, because there isn't 
a high density of address-objects to have enough points for linking with 
streets.

So it would be better to use relations to put tags to all streets in a 
form like
mkgmap:city=
mkgmap:district=
mkgmap:state=
mkgmap:country=

Also it would be useful to set an global default for each of these tags 
in mkgmap-call, because it could be possible, that there isn't any 
country relation in an extract.

Henning

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


Re: [mkgmap-dev] mkgmap and values with semicolon in it

2011-02-24 Thread WanMil
> Hi,
>
> I haven't found anything about this beside a very old mail,
> that mkgmap does not support it.
> There are several entries with key=value1;value2, means there
> are several values with a semicolon seperated.
> All this entries are missing in my created map, so I assume
> that this still does not work? Or should it be?
>
> One of my rules for example is:
> amenity=vending_machine&  (vending=parcel_pickup | vending=parcel_mail_in) ..
>
> The entries with:
> amenity=vending_machine
> vending=parcel_pickup
>
> or
>
> amenity=vending_machine
> vending=parcel_mail_in
>
> are rendered, but all points with:
>
> amenity=vending_machine
> vending=parcel_pickup;parcel_mail_in
>
> are not. Can mkgmap really not handle that? Is there any
> workaround?
>
>Thanks,
> Thorsten
>

Thorsten,

what would you expect?
- Two POIs at the same location?
- One POI at the same location?
- Two POIs at the same location if the two tags will be assigned with 
different garmin ids and one POI if will be assigned with same garmin id?

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


Re: [mkgmap-dev] [index] Automatic location completion

2011-02-24 Thread WanMil
>> After the index branch has been developed so far that we can use the
>> results in MapSource (thanks to Steve!!) there is a big need for a
>> mechanism to fill missing location information.
>>
>> There has been a lot of discussion about that. It stopped because it
>> was quite theoretical (from my point of view). Therefore I have
>> started to implement a prototype osm hook that tries to complete the
>> missing location information. I think the is_in tag is quite
>> problematic therefore I decided to use the addr tags.
>>
>> Attached is a *very* early implementation that makes use of the
>> boundary polygons. It checks all nodes and ways/polygons within all
>> boundary polygons and fills the missing addr tags.
>>
>> I think this is a better foundation for the discussion how we want to
>> fill the missing location information.
>>
>> Before flaming me about terrible code please be aware that:
>> * the patch is not optimized
>> * it's version 1, so far away from handling all situations / countries
>> * it's a very early prototype
>>
>> I would be happy if you try it and make some proposals how it could be
>> improved.
>>
>> Some improvements I already know and thinking about:
>> * The new hook should run after the multipolygon finishing and not before
>> * The is_in tag should be handled
> I suppose you mean in case boundary polygons are missing.

Not really. I thought that I should not add any address information if 
the is_in tag is already set. But the is_in tag is very problematic. So 
I should delete this point.

>> * boundary information propagation =>  First go through all boundaries
>> and add the information from higher levels to lower ones, i.e. add
>> addr:district to all city boundaries within that district
>> * Use landuse=residential information in combination with the place nodes
>> * In case a boundary level is missing (which mostly will be the case
>> for countries admin_level=2), select the addr information from all
>> nodes and ways within a boundary by using the most used addr-tag
>> value. (in germany the addr:country=DE should be the most used)
> According to [1], there's a great variety in the matching of
> admin_level=* to places across countries, so it could be useful to have
> some options to choose what admin_level one want to assign to a given
> place=*. In a first try of your patch in Spain I see some streets are
> assigned suburbs while they should be (IMHO) assigned to cities.
> Searching for several streets and leaving city blank I get three (by
> now) patterns:
> street, city, region, country (the right one for me)
> street, suburb, province, country (street assigned to nearest
> place=suburb node)
> street, suburb, region, country (I don't know if street is assigned to
> boundary polygons or to nearest place=suburb node, because both exist
> and unpatched mkgmap gives the same result).
> I could give you ID's of involved nodes, streets and relations if you
> need them.
>
> [1]http://wiki.openstreetmap.org/wiki/Key:admin_level#admin_level

Yes, I expect such configuration needs. It seems as if it will be 
necessary to have a config file for this information (which addr-level 
should be used for which information in which country). I'll put it on 
my list.
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


Re: [mkgmap-dev] [index] Automatic location completion

2011-02-24 Thread WanMil
> Hi,
> if you just want to complete addr:*-tag, it's good to use addr:* prefix.

I don't understand. Where should I use the addr:* prefix?

> But I think this isn't useful for searching streets, because many
> streets in OSM haven't any correspondending addr:-tags.
>
> If you want to set add:* directly to the streets, I think another prefix
> would be better, just to keep it seperate.

I have chosen the addr: tags consciously because they are already 
handled by mkgmap. I don't see a big advantage to invent a new tag for 
which new special handling must be implemented. Am I wrong?

WanMil

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


Re: [mkgmap-dev] [index] Automatic location completion

2011-02-24 Thread WanMil
>
>> Attached is a *very* early implementation that makes use of the boundary
>> polygons. It checks all nodes and ways/polygons within all boundary
>> polygons and fills the missing addr tags.
>
> This seems to be a good idea.
>
> And which location-autofill option has to be used with this ?
>
> Chris
>

At the moment it is independent from the location-autofill mechanism. As 
far as I understand the autofill mechanism all items that are assigned 
with proper information by the new algorithm must not be completed by 
the old autofill.

In the end it should replace the autofill mechanism (if it's better...)

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


Re: [mkgmap-dev] Multipolygon problem

2011-02-24 Thread WanMil
Torsten,

I have no time at the moment to perform a deep check of that patch. So 
unless some people on the list confirm that it doesn't harm I don't want 
to commit that. I hope that's ok?!?

WanMil

> WanMil schrieb am 08.01.2011 11:44:
>> I have attached that patch to limit polygon creation to closed ways.
>> It's untested and I assume there are some unwanted effects at tile
>> borders. Please check and if you (and others) find it usefull it can be
>> committed.
>
> Did anybody else try this patch? I haven't noticed any problems and would like
> to see this patch comitted.
>
> Gruss
> Torsten
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


[mkgmap-dev] [PATCH v1] Creating separate lines for coastlines with generate-sea=no-mp

2011-02-24 Thread WanMil

The referred patch is much too old to be used now.
I have created a new patch. Please test it and if it finds enough 
supporters on the list I will commit it.


WanMil


Charlie Ferrero  cferrero.net>  writes:



On 22/02/2011 23:50, WanMil wrote:

Hi Bill,

which patch do you mean? Can you give a link to it?

WanMil


This might be what he's referring to:
http://www.mkgmap.org.uk/pipermail/mkgmap-dev/2010q1/007920.html




Yes, that looks like the one, although in the thread referred to, I think that
'--generate-coastline' should read '--generate-sea'.

I have no experience of compiling Windows programs from source code so cannot
try the patch myself.  Are there any archived builds that contain this patch I
could try?.

Bill.

Index: src/uk/me/parabola/mkgmap/reader/osm/SeaGenerator.java
===
--- src/uk/me/parabola/mkgmap/reader/osm/SeaGenerator.java	(revision 1860)
+++ src/uk/me/parabola/mkgmap/reader/osm/SeaGenerator.java	(working copy)
@@ -270,6 +270,18 @@
 			log.info("Shorelines from extra file:", shoreline.size());
 		}
 
+		if (generateSeaUsingMP == false) {
+			// create a copy of the natural=coastline ways so that a line can be 
+			// drawn for the coastline
+			for (Way way : shoreline) {
+Way coastWay = new Way(FakeIdGenerator.makeFakeId(), new ArrayList(way.getPoints()));
+coastWay.addTag("natural", "coastline");
+// use this way only for the line style
+coastWay.addTag(MultiPolygonRelation.STYLE_FILTER_TAG, MultiPolygonRelation.STYLE_FILTER_LINE);
+saver.addWay(coastWay);
+			}
+		}
+		
 		int closedS = 0;
 		int unclosedS = 0;
 		for (Way w : shoreline) {
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Re: [mkgmap-dev] [index] Automatic location completion

2011-02-24 Thread Carlos Dávila
El 22/02/11 23:34, WanMil escribió:
> After the index branch has been developed so far that we can use the 
> results in MapSource (thanks to Steve!!) there is a big need for a 
> mechanism to fill missing location information.
>
> There has been a lot of discussion about that. It stopped because it 
> was quite theoretical (from my point of view). Therefore I have 
> started to implement a prototype osm hook that tries to complete the 
> missing location information. I think the is_in tag is quite 
> problematic therefore I decided to use the addr tags.
>
> Attached is a *very* early implementation that makes use of the 
> boundary polygons. It checks all nodes and ways/polygons within all 
> boundary polygons and fills the missing addr tags.
>
> I think this is a better foundation for the discussion how we want to 
> fill the missing location information.
>
> Before flaming me about terrible code please be aware that:
> * the patch is not optimized
> * it's version 1, so far away from handling all situations / countries
> * it's a very early prototype
>
> I would be happy if you try it and make some proposals how it could be 
> improved.
>
> Some improvements I already know and thinking about:
> * The new hook should run after the multipolygon finishing and not before
> * The is_in tag should be handled
I suppose you mean in case boundary polygons are missing.
> * boundary information propagation => First go through all boundaries 
> and add the information from higher levels to lower ones, i.e. add 
> addr:district to all city boundaries within that district
> * Use landuse=residential information in combination with the place nodes
> * In case a boundary level is missing (which mostly will be the case 
> for countries admin_level=2), select the addr information from all 
> nodes and ways within a boundary by using the most used addr-tag 
> value. (in germany the addr:country=DE should be the most used)
According to [1], there's a great variety in the matching of 
admin_level=* to places across countries, so it could be useful to have 
some options to choose what admin_level one want to assign to a given 
place=*. In a first try of your patch in Spain I see some streets are 
assigned suburbs while they should be (IMHO) assigned to cities. 
Searching for several streets and leaving city blank I get three (by 
now) patterns:
street, city, region, country (the right one for me)
street, suburb, province, country (street assigned to nearest 
place=suburb node)
street, suburb, region, country (I don't know if street is assigned to 
boundary polygons or to nearest place=suburb node, because both exist 
and unpatched mkgmap gives the same result).
I could give you ID's of involved nodes, streets and relations if you 
need them.

[1]http://wiki.openstreetmap.org/wiki/Key:admin_level#admin_level
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


[mkgmap-dev] mkgmap and values with semicolon in it

2011-02-24 Thread Thorsten Kukuk
Hi,

I haven't found anything about this beside a very old mail,
that mkgmap does not support it.
There are several entries with key=value1;value2, means there
are several values with a semicolon seperated.
All this entries are missing in my created map, so I assume
that this still does not work? Or should it be?

One of my rules for example is:
amenity=vending_machine & (vending=parcel_pickup | vending=parcel_mail_in) ..

The entries with:
amenity=vending_machine
vending=parcel_pickup

or 

amenity=vending_machine
vending=parcel_mail_in

are rendered, but all points with:

amenity=vending_machine
vending=parcel_pickup;parcel_mail_in

are not. Can mkgmap really not handle that? Is there any
workaround?

  Thanks,
   Thorsten

-- 
Thorsten Kukuk, Project Manager/Release Manager SLES
SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg
GF: Markus Rex, HRB 16746 (AG Nuernberg)
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev