I think this is a good solution
On Wed, Jan 30, 2013 at 7:35 PM, Sander Deryckere sander...@gmail.comwrote:
I've just been thinking about this issue. And I assume that we're not the
only one with this problem, where the url you want to see would depend on a
reference tag.
So, why not create a shared document that defines how to get different
url's from different kind of tags. I think about creating an XML document
with an extension of RegExp. Here's an example of what I got this far, for
simple url tags, for difficult wikipedia tags, and for our example from De
Lijn. Also some extensions for images and phone numbers are possible. This
way, every country could have its own custom links for certain public
transport things, or restaurant or supermarket chains. It also means that,
if the url ever changes, only this document needs to be changed, not a
bazillion of OSM elements.
Here's my example
http://pastebin.com/QDHJKxtX
Let me explain it.
The top XML node is simple. The subnodes are link nodes. They're meant
to link OSM elements to external stuff (like websites, images, phone
numbers etc).
A link node contains tags, they have a key and value expressed in an
extension of extended POSIX regex (
http://en.wikipedia.org/wiki/Regex#POSIX). Basically, during the reading
of the regex, you also store stuff in variables, which can be used later.
Let me explain the most difficult one, the wikipedia link. The first part
of the extended regex is [a-z]*. This stands for the language code, and
it's stored in variable l for later usage (with the syntax \l). Then
you have a column, this sign isn't used in the link, so it's stored in the
variable 0 (with the syntax \0). As a last part, you have a random
string .* and it's stored in the variable n.
Later, these variables are used in the creation of the url.
The example for De Lijn requires three different OSM tags to be present,
but only uses the value from the ref tag to create the url.
One link can link a combination of OSM tags to multiple things (like
multiple urls, or an url and an image).
This is just a proposal btw, the exact syntax is up for discussion. But I
think it would solve all similar examples as we have with De Lijn, it will
be beneficial for Openlinkmap, and by creating a standard, the file could
be shared with other websites and apps too.
The same file could be used to link this node
http://www.openstreetmap.org/browse/node/724232554 to this page
http://www.connexxion.nl/dienstregeling/haltedisplay/57002550
If it makes sense to you guys, maybe we should ask openlinkmap to try
support for such a settings file. If openlinkmap agrees, it could also be
implemented in other apps s.a. OsmAnd.
Regards,
Sander
2013/1/30 Sander Deryckere sander...@gmail.com
I don't really like this. The problem isn't putting this tag on all
existing stops. The problem is communicating this to non-members of this
list.
I think openlinkmap and other data users should in the end know that
operator=De Lijn+ref=x0 translates to the url mijnlijn.be/x0.
It's easier to patch their software than to learn all mappers what to put
in the url tag.
Just my opinion though.
Regards,
Sander.
On 30 Jan 2013 14:15, Ben Abelshausen ben.abelshau...@gmail.com
wrote:
+1 on the url=http://mijnlijn.be/#{ref} feature!
Does anyone have the time to actually translate this into code?
On Wed, Jan 30, 2013 at 1:38 PM, Wim Crols w...@crols.be wrote:
on the wiki page it says the following
https://wiki.openstreetmap.org/wiki/OpenLinkMap#Contribute
*Programming:* You created an interesting new feature or fixed a bug
in the existing code? Please send me your code and I will add it.
on second thoughts it would even be better that openlinkmap would
support this kind of url
url=http://mijnlijn.be/#{ref}
where it will replace a placeholder with the contents of a tag with the
name of the placeholder.
This is more versatile and could be used for other purposes too.
On Wed, Jan 30, 2013 at 11:26 AM, Jo winfi...@gmail.com wrote:
I asked the admins of openlinkmap if this is even possible, but I'm
still waiting for a reply, of course. I was planning to wait for their
answer to react to Wim's suggestion.
Jo
2013/1/30 Ben Abelshausen ben.abelshau...@gmail.com
I guess that would mean adapting openlinkmap specifically for
mijnlijn.be. Is that a good idea?
Regards,
Ben
On Wed, Jan 30, 2013 at 10:26 AM, Wim Crols w...@crols.be wrote:
I would suggest the following
Leave ref tag as it is ref=x0
Put in url tag the following http://mijnlijn.be/;
And make a software patch for openlinkmap to show the correct link
on existence of the following tags
highway = bus_stop
operator = De Lijn
ref = 303119
url = http://mijnlijn.be/
Regards
Wim Crols
On Wed, Jan 30, 2013 at 9:31 AM, Jo winfi...@gmail.com wrote:
Hi,
Historically we have been putting the 6 digit serial number