logo separator

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

From Gerd Petermann gpetermann_muenchen at hotmail.com on Thu Nov 22 08:23:44 GMT 2018

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 at lists.mkgmap.org.uk> im Auftrag von andreas.schmidt.hetschbach at t-online.de <andreas.schmidt.hetschbach at 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 at hotmail.com>
Gesendet: Mittwoch, 21. November 2018 11:32
An: mkgmap-dev at lists.mkgmap.org.uk<mailto:mkgmap-dev at 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 at lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: apply_first.patch
Type: application/octet-stream
Size: 2907 bytes
Desc: apply_first.patch
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20181122/fabd71a2/attachment.obj>


More information about the mkgmap-dev mailing list