Re: [mkgmap-dev] continue command in combination with add-pois-to-areas

2010-10-16 Thread Walter Schlögl
Hi,

the feature add-pois-to-areas seems to have a disadvantage,
not working together with the continue command.

Altough I did not fully understand the reason,
(maybe it is related to the ordering of processing polygons and pois,
maybe it's because of difficulty to identify closed polygons)
I will nevertheless try to give a proposal for a future solution.

At the moment all add-pois-to-areas have to be identified
by processing the polygons style file, and all items having no style here
will not get a POI mapped.

My idea is a special style file that is processed before polygons and 
points.
The content of this substitute style file shall be used to
1.) define polygons that shall be added as poi (in the center),
2.) define lines that shall be added as poi (in the center or at both ends),
3.) include all name changes on only one location.

My proposal could also be a solution for some other issues.

*) It's not possible to set overlay pois on ways
(e.g. to set a maxheight symbol on narrow tunnels)

*) All name changes have to be placed in both polygons and lines
style files and have to be maintained in both files synchronosly.

*) All pois that are inserted as an area have to be placed
in polygons file, even if no area should be shown in map.
(e.g. highway=services shall only be shown as POI in most maps)

So please proof this proposal if it could be a practical solution.

Walter 

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


Re: [mkgmap-dev] continue command in combination with add-pois-to-areas

2010-10-16 Thread Felix Hartmann
  On 16.10.2010 13:36, Walter Schlögl wrote:
 Hi,

 the feature add-pois-to-areas seems to have a disadvantage,
 not working together with the continue command.

 Altough I did not fully understand the reason,
 (maybe it is related to the ordering of processing polygons and pois,
 maybe it's because of difficulty to identify closed polygons)
 I will nevertheless try to give a proposal for a future solution.

 At the moment all add-pois-to-areas have to be identified
 by processing the polygons style file, and all items having no style here
 will not get a POI mapped.

 My idea is a special style file that is processed before polygons and
 points.
 The content of this substitute style file shall be used to
 1.) define polygons that shall be added as poi (in the center),
 2.) define lines that shall be added as poi (in the center or at both ends),
 3.) include all name changes on only one location.


I'ld fully support this. The current behaviour is simply not very 
practical. Other possibility would be a a key to specify the behaviour 
inside the polygons file (like a) only polygon b) only POI c) 
POI+Polygon)...

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


Re: [mkgmap-dev] continue command in combination with add-pois-to-areas

2010-10-14 Thread aighes


Torsten Leistikow wrote:
 
 As a user I would like to have an action command in the polygon (and also
 in the
 lines) style rules for generating a POI for a specific area (and also for
 a
 specific line). Actually I would like to have multiple commands, e.g.
 add-centre-node (new node in the geometric centre of the polygon)
 add-start-node (first node of the polygon)
 add-end-node (last node of the polygon)
 add-middle-node (middle node of the polygon)
 add-inner-node (all nodes of the polygon beside the first and the last
 one)
 add-all-node (all nodes of the polygon)
 
 I could think of multiple uses for such a feature.
 
 I do not know, whether this would be possible, since it would require a
 processing of the polygon and line rules before the processing of the
 point rules.
 
+1

I think, you'll need a preprocessing, searching for all closed ways an
create new Nodes at the required position. After this mkgmap can run in
normal order

aighes

-- 
View this message in context: 
http://gis.638310.n2.nabble.com/Re-continue-command-in-combination-with-add-pois-to-areas-tp5620374p5636653.html
Sent from the Mkgmap Development mailing list archive at Nabble.com.
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


Re: [mkgmap-dev] continue command in combination with add-pois-to-areas

2010-10-12 Thread WanMil
 Steve Ratcliffe wrote:
 Hi

 points style:

 shop=car_repair [0x2c14 continue]
 shop=car_repair [0x2c09]

 and a polygon style:

 shop=car_repair [0x12]

 Processing this on a very simple OSM file containing one polygon tagged
 shop=car_repair and one point tagged shop=car_repair, using
 the --add-pois-to-areas switch, I see:
 One polygon of type 0x12, with a 0x2c09 POI in the centre
 Two POIs consisting of one of type 0x2c09 overlain on top of another of type
 0x2c14

 Yes that does appear to be the case.

 It might be difficult to change. We don't know if something is a polygon
 until after the style rules have been run and at that stage it is too
 late for the normal processing to occur for the generated point.  At
 least that the way it is written - it is possible that it could be
 changed, if anyone has any ideas please post.

 Regards,

 ..Steve

 I'm sure I saw an email from WanMil recently that said there already is
code in mkgmap that can test to see if an object is a closed polygon.

Yes, it is possible to check if an object is a closed which does not 
necessarily mean that it is a polygon (example: roundabout). But we 
could add some methods (maybe they already exist) that can check if an 
object is tagged with polygon tags.

If, so, then this code could be re-used and --add-pois-to-areas could
 be run before the style file processing.  Whilst I'm helpfully palming
 off work to others more skilful than myself, could whoever does this
 also add some logic to make sure the resultant POI is always placed
 *inside* the polygon? :)

Do you have an algorithm that performs within an acceptable time?


 --
 Charlie
 ___
 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] continue command in combination with add-pois-to-areas

2010-10-12 Thread Torsten Leistikow
Steve Ratcliffe schrieb am 12.10.2010 00:16:
 if anyone has any ideas please post.

As a user I would like to have an action command in the polygon (and also in the
lines) style rules for generating a POI for a specific area (and also for a
specific line). Actually I would like to have multiple commands, e.g.
add-centre-node (new node in the geometric centre of the polygon)
add-start-node (first node of the polygon)
add-end-node (last node of the polygon)
add-middle-node (middle node of the polygon)
add-inner-node (all nodes of the polygon beside the first and the last one)
add-all-node (all nodes of the polygon)

I could think of multiple uses for such a feature.

I do not know, whether this would be possible, since it would require a
processing of the polygon and line rules before the processing of the point 
rules.

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