Re: [mkgmap-dev] Too many pois on multipolygon areas

2011-09-27 Thread WanMil
> WanMil schrieb am 27.09.2011 19:27:
>> Maybe it's not be too difficult to fix that. Here is my idea:
>> Just before the style conversion one point for each polygon is added
>> with a copy of all tags plus mkgmap:poly2poi=true. Polygons contained in
>> or created by a multipolygon are excluded but additionaly one point for
>> each multipolygon is added.
>>
>> Now the rules in the points style are applied automatically.
>
> I think you also have to change the style file, so that all the polygons 
> created
> by the mp processing are not used by the style conversion. This should be easy
> by checking that there is no mkgmap:mp_created tag.

Do I understand you correct?: The polygons style should be used for 
polygons created by mp processing but only one POI should be created for 
the whole multipolygon and not one for each mp created polygon.

>
> I think (in a first step) you need not to care, whether teh created POI is
> within the mp area or within a hole, because also for normal (concave) 
> polygons
> right now it is not ensured, that the created POI is within the polygon.

Yep.
First step: use the center point of a geometry. Don't care if it's in or 
out.

Further step: Maybe someone likes to implement the straight skeleton 
algorithm (http://en.wikipedia.org/wiki/Straight_skeleton). This could 
be used to find a quite perfect point which is guaranteed to be inside 
the geometry. If you have the straight skeleton you can choose the point 
on the skeleton with the greatest distance to an end point of the skeleton.

>
> Gruss
> Torsten

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


Re: [mkgmap-dev] Too many pois on multipolygon areas

2011-09-27 Thread Torsten Leistikow
WanMil schrieb am 27.09.2011 19:27:
> Maybe it's not be too difficult to fix that. Here is my idea:
> Just before the style conversion one point for each polygon is added 
> with a copy of all tags plus mkgmap:poly2poi=true. Polygons contained in 
> or created by a multipolygon are excluded but additionaly one point for 
> each multipolygon is added.
> 
> Now the rules in the points style are applied automatically.

I think you also have to change the style file, so that all the polygons created
by the mp processing are not used by the style conversion. This should be easy
by checking that there is no mkgmap:mp_created tag.

I think (in a first step) you need not to care, whether teh created POI is
within the mp area or within a hole, because also for normal (concave) polygons
right now it is not ensured, that the created POI is within the polygon.

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


Re: [mkgmap-dev] Too many pois on multipolygon areas

2011-09-27 Thread Chris66
Am 27.09.2011 19:27, schrieb WanMil:

> Maybe it's not be too difficult to fix that. Here is my idea:
> Just before the style conversion one point for each polygon is added 
> with a copy of all tags plus mkgmap:poly2poi=true. Polygons contained in 
> or created by a multipolygon are excluded but additionaly one point for 
> each multipolygon is added.
> 
> Now the rules in the points style are applied automatically.
> 
> Sounds too simple...? Any objections to such a solution?

You should make sure that the one point for each MP is contained
in the MP and not in the inner-hole.

Chris

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


Re: [mkgmap-dev] Too many pois on multipolygon areas

2011-09-27 Thread WanMil
>
>
> Minko (ligfiet...@online.nl) wrote:
>
>> I have enabled the add-pois-to-areas option, because this way I can
>> search for a certain tag that is placed on an area like landuse=*,
>> tourism=* or building=yes. But sometimes those pois are cluttering
>> the map, especially if this area is a type=multipoygon relation.
>>
>> Take for example this multipolygon relation:
>> http://www.openstreetmap.org/browse/relation/949481
>> tourism=zoo is tagged only once on the outer way:
>> http://www.openstreetmap.org/browse/way/61046378
>>
>> However, the multipolygon function of mkgmap splits this area up in
>> several parts (to render the inner islands, which is fine) but it
>> also creates too many pois by the add-pois-to-areas for this one
>> tourism=zoo area: http://img546.imageshack.us/img546/5763/zoow.jpg
>>
>> I'd like to see just one elephant icon instead of several. Is it
>> possible to execute the add-pois-to-areas action before the
>> multipolygon action takes place?
>> Or is it possible to set some rules in the style file to make some
>> exceptions for areas with type=multipolygon?
>>
>
> This is a known issue
> (http://wiki.openstreetmap.org/wiki/Mkgmap/known_issues#Too_many_POIs_for_a_given_area_that_has_been_split_using_multipolygon_code).
>
> WanMil had a look at it a few months back and concluded that there
> wasn't a quick fix
> (http://www.mail-archive.com/mkgmap-dev@lists.mkgmap.org.uk/msg07431.html).
>
> I would really like to see this bug fixed as it can add many duplicate
> POIs to a map.
>

Maybe it's not be too difficult to fix that. Here is my idea:
Just before the style conversion one point for each polygon is added 
with a copy of all tags plus mkgmap:poly2poi=true. Polygons contained in 
or created by a multipolygon are excluded but additionaly one point for 
each multipolygon is added.

Now the rules in the points style are applied automatically.

Sounds too simple...? Any objections to such a solution?

WanMil







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


Re: [mkgmap-dev] Too many pois on multipolygon areas

2011-09-27 Thread Minko
Thanks Charlie,
Maybe it helps if I put the tag tourism=zoo on the relation instead on the 
outer way (which is the recommended osm rule anyway).

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


Re: [mkgmap-dev] Too many pois on multipolygon areas

2011-09-27 Thread charlie


Minko (ligfiet...@online.nl) wrote:

> I have enabled the add-pois-to-areas option, because this way I can  
> search for a certain tag that is placed on an area like landuse=*,  
> tourism=* or building=yes. But sometimes those pois are cluttering  
> the map, especially if this area is a type=multipoygon relation.
>
> Take for example this multipolygon relation:  
> http://www.openstreetmap.org/browse/relation/949481
> tourism=zoo is tagged only once on the outer way:  
> http://www.openstreetmap.org/browse/way/61046378
>
> However, the multipolygon function of mkgmap splits this area up in  
> several parts (to render the inner islands, which is fine) but it  
> also creates too many pois by the add-pois-to-areas for this one  
> tourism=zoo area: http://img546.imageshack.us/img546/5763/zoow.jpg
>
> I'd like to see just one elephant icon instead of several. Is it  
> possible to execute the add-pois-to-areas action before the  
> multipolygon action takes place?
> Or is it possible to set some rules in the style file to make some  
> exceptions for areas with type=multipolygon?
>

This is a known issue  
(http://wiki.openstreetmap.org/wiki/Mkgmap/known_issues#Too_many_POIs_for_a_given_area_that_has_been_split_using_multipolygon_code).

WanMil had a look at it a few months back and concluded that there  
wasn't a quick fix  
(http://www.mail-archive.com/mkgmap-dev@lists.mkgmap.org.uk/msg07431.html).

I would really like to see this bug fixed as it can add many duplicate  
POIs to a map.


-- 
Charlie

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


[mkgmap-dev] Too many pois on multipolygon areas

2011-09-27 Thread Minko
I have enabled the add-pois-to-areas option, because this way I can search for 
a certain tag that is placed on an area like landuse=*, tourism=* or 
building=yes. But sometimes those pois are cluttering the map, especially if 
this area is a type=multipoygon relation. 

Take for example this multipolygon relation: 
http://www.openstreetmap.org/browse/relation/949481
tourism=zoo is tagged only once on the outer way: 
http://www.openstreetmap.org/browse/way/61046378

However, the multipolygon function of mkgmap splits this area up in several 
parts (to render the inner islands, which is fine) but it also creates too many 
pois by the add-pois-to-areas for this one tourism=zoo area: 
http://img546.imageshack.us/img546/5763/zoow.jpg

I'd like to see just one elephant icon instead of several. Is it possible to 
execute the add-pois-to-areas action before the multipolygon action takes place?
Or is it possible to set some rules in the style file to make some exceptions 
for areas with type=multipolygon?




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