Re: [mkgmap-dev] Add a POI to the start of a relation (route:mtb)

Hi Gerd, you got it. 1-2) I see these Problems also. But there are at least partial goals one could achieve even if the route is incomplete or not sorted: • One can search for MTB-Routes as POIs (taking into account that the POI could be shown SOMEwhere on the route) • Obtain all the data which is avaiable on OSM About the route (like ascent/distance, Operator, Website ) 3) At least the goals as in 1-2 will be reached, in addition mkgmap could check role = Forward/backward to be sure if the end or the beginning of the way is the first node. (if it is way). Andreas Gesendet von Mail für Windows 10

Hi Andreas, I assume you don't plan to implement that on your own and provide a patch? I'll have a look this week... Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von andreas.schmidt.hetschbach@t-online.de <andreas.schmidt.hetschbach@t-online.de> Gesendet: Montag, 19. November 2018 09:48 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] Add a POI to the start of a relation (route:mtb) Hi Gerd, you got it. 1-2) I see these Problems also. But there are at least partial goals one could achieve even if the route is incomplete or not sorted: * One can search for MTB-Routes as POIs (taking into account that the POI could be shown SOMEwhere on the route) * Obtain all the data which is avaiable on OSM About the route (like ascent/distance, Operator, Website ) 3) At least the goals as in 1-2 will be reached, in addition mkgmap could check role = Forward/backward to be sure if the end or the beginning of the way is the first node. (if it is way). Andreas Gesendet von Mail<https://go.microsoft.com/fwlink/?LinkId=550986> für Windows 10

Hi Andreas, I still don't see where to handle this in mkgmap. A way can be the member of several route relations. It might be the start of one and the end of two others, or vice versa. When the route describes a closed ring it would be start and end. I don't want to handle those cases in the java code, this should be done in the style. So, maybe a style function mem_pos() could help? I could be used in a rule like this type=route & route=mtb { apply mem_pos() = 1 { set ... } } Or maybe the style function should return "first", "somewhere", "last" ? Gerd -- Sent from: http://gis.19327.n8.nabble.com/Mkgmap-Development-f5324443.html

Hi, for some time mkgmap allows for code like this: type=route & route=mtb { apply role=start { set ... } apply role=stop { set ... } } I'm not sure about "role=stop", it is described as a bus stop, but maybe for cycle route it has a different meaning. -- Best regard, Andrzej

Hi Andreas, sorry, it would work but it would require a lot of work since a normal style function only knows either the relation or the member, not both. While looking at this I noticed the apply_once action. I think it is almost what we need, so I implemented an apply_first action with the attached patch. As the name suggests it is only executed for the first member. A binary is here: http://files.mkgmap.org.uk/detail/438 Please let me know if that works for you, if yes, I'll add some documentation. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von andreas.schmidt.hetschbach@t-online.de <andreas.schmidt.hetschbach@t-online.de> Gesendet: Mittwoch, 21. November 2018 15:24 An: mkgmap-dev; Development list for mkgmap Betreff: Re: [mkgmap-dev] Add a POI to the start of a relation (route:mtb) Hi Gerd, type=route & route=mtb { apply mem_pos() = [first,x,last] { set ... } } Could do the job. Andreas Gesendet von Mail<https://go.microsoft.com/fwlink/?LinkId=550986> für Windows 10 Von: Gerd Petermann<mailto:gpetermann_muenchen@hotmail.com> Gesendet: Mittwoch, 21. November 2018 11:32 An: mkgmap-dev@lists.mkgmap.org.uk<mailto:mkgmap-dev@lists.mkgmap.org.uk> Betreff: Re: [mkgmap-dev] Add a POI to the start of a relation (route:mtb) Hi Andreas, I still don't see where to handle this in mkgmap. A way can be the member of several route relations. It might be the start of one and the end of two others, or vice versa. When the route describes a closed ring it would be start and end. I don't want to handle those cases in the java code, this should be done in the style. So, maybe a style function mem_pos() could help? I could be used in a rule like this type=route & route=mtb { apply mem_pos() = 1 { set ... } } Or maybe the style function should return "first", "somewhere", "last" ? Gerd -- Sent from: http://gis.19327.n8.nabble.com/Mkgmap-Development-f5324443.html _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Gerd, I think it would be better to have something like apply_first_way. See for example these relations, where first member is a point: https://www.openstreetmap.org/relation/1699620 https://www.openstreetmap.org/relation/254686 -- Best regards, Andrzej

Hi Andrzej, there is a comment in style file relations : # apply way { add name='${name}' } but it seems this syntax was never implemented. I can try to add that, too. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Andrzej Popowski <popej@poczta.onet.pl> Gesendet: Donnerstag, 22. November 2018 10:57 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: Re: [mkgmap-dev] Add a POI to the start of a relation (route:mtb) Hi Gerd, I think it would be better to have something like apply_first_way. See for example these relations, where first member is a point: https://www.openstreetmap.org/relation/1699620 https://www.openstreetmap.org/relation/254686 -- Best regards, Andrzej _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
participants (3)
-
andreas.schmidt.hetschbach@t-online.de
-
Andrzej Popowski
-
Gerd Petermann