Opened 18 months ago

Last modified 3 weeks ago

#15158 reopened enhancement

Feature request Tag2Link: ref:bag

Reported by: de_vries Owned by: Don-vip
Priority: normal Milestone:
Component: Plugin tag2link Version:
Keywords: netherlands Cc:

Description (last modified by Don-vip)

Disclaimer: If this is not the right place for feature requests for plug-ins, please point me to the right place.

In the Netherlands all buildings and addresses are imported from a official database (BAG). All buildings have their BAG-ID in the tag "ref:bag". I would like to have Tag2Link to provide a link, based on the "ref:bag" tag, to that object in the BagViewer. This is a website were you can view the official BAG database:

To achieve this I added the following code to the "tag2link_sources.xml" file:

    <!-- BAG - Buildings in The Neterlands --> 
    <src name="BAG">
            <condition k="ref:bag" />
            <link name="Open in BAG Viewer" href="" />

This code adds a "0" in font of the BAG-ID. Here is why:

  • All BAG-ID's consist of 16 numbers
  • Most BAG-ID's start with a 0
  • Those leading zero's are striped from the BAG-ID when imported to OSM.
  • The BagViewer doesn't work if you leave out the leading zero.

So my code works in most cases, but when there was no leading zero in the original BAG-ID, it doesn't work.

I have two questions:

  • How to fix this code to ad just enough leading zero's to make the BAG-ID exactly 16 numbers long?
  • Can this be added to the plugin?

Additional details:
ref:bag is used 10.000.000 times:
Example of a building without a leading zero in the BAG-ID:

Example of a building with a leading zero in the BAG-ID:

Attachments (0)

Change History (6)

comment:1 Changed 18 months ago by stoecker

Component: CorePlugin tag2link
Owner: changed from team to Don-vip
Type: defectenhancement

comment:2 Changed 18 months ago by Don-vip

Description: modified (diff)
Keywords: netherlands added
Status: newassigned

It is the right place :) I will look into it.

comment:3 Changed 4 weeks ago by Don-vip

Summary: Feature request Tag2LinkFeature request Tag2Link: ref:bag

comment:4 Changed 4 weeks ago by Don-vip

Resolution: fixed
Status: assignedclosed

Fixed in [o34854:34856].

comment:5 Changed 4 weeks ago by stoecker

Hmm, did you looks at the mentioned formating issue?

comment:6 Changed 3 weeks ago by Don-vip

Resolution: fixed
Status: closedreopened

Seems not

Modify Ticket

Change Properties
Set your email in Preferences
as reopened The owner will remain Don-vip.
as The resolution will be set.
to The owner will be changed from Don-vip to the specified user.
The owner will change to de_vries
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.