source: osm/applications/editors/josm/plugins/tag2link/data/tag2link_sources.xml@ 26912

Last change on this file since 26912 was 26912, checked in by donvip, 13 years ago

Initial work on a new JOSM plugin: tag2link

File size: 4.1 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3// JOSM tag2link plugin.
4// Copyright (C) 2011 Don-vip & FrViPofm
5//
6// This program is free software: you can redistribute it and/or modify
7// it under the terms of the GNU General Public License as published by
8// the Free Software Foundation, either version 3 of the License, or
9// (at your option) any later version.
10//
11// This program is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14// GNU General Public License for more details.
15//
16// You should have received a copy of the GNU General Public License
17// along with this program. If not, see <http://www.gnu.org/licenses/>.
18 -->
19<tag2link>
20
21 <!-- Global -->
22
23 <source name="Common">
24 <rule>
25 <condition k="website" />
26 <link name="View website" href="{v}" />
27 </rule>
28 <rule>
29 <condition k="url" />
30 <link name="View URL" href="{v}" />
31 </rule>
32 </source>
33
34 <source name="Wikipedia">
35 <rule>
36 <condition k="wikipedia(?::([\p{Lower}]{2,}))?" />
37 <link name="View {name} article" href="http://{k.1:en}.wikipedia.org/wiki/{v}" />
38 </rule>
39 </source>
40
41 <!-- Only for France -->
42
43 <source name="SANDRE" country-code="FR">
44 <rule>
45 <condition k="ref:sandre" v="[A-Z0-9-]{8}" />
46 <link name="View {name} sheet of river" href="http://services.sandre.eaufrance.fr/Courdo/Fiche/client/fiche_courdo.php?CdSandre={v}" />
47 </rule>
48 </source>
49
50 <source name="INSEE" country-code="FR">
51 <rule>
52 <condition k="admin_level" v="8"/>
53 <condition k="ref:INSEE" v="(\p{Digit}{2})(\p{Digit}{3})"/>
54 <link name="View {name} municipality sheet" href="http://www.insee.fr/fr/methodes/nomenclatures/cog/fichecommunale.asp?codedep={v.1}&amp;codecom={v.2}" />
55 </rule>
56 <rule>
57 <condition k="political_division" v="FR:canton"/>
58 <condition k="ref:INSEE" v="(\p{Digit}{2})(\p{Digit}{2})"/>
59 <link name="View {name} map of municipalities" href="http://www.insee.fr/fr/methodes/nomenclatures/cog/carte_comcan.asp?codecan={v}" />
60 <link name="View {name} list of municipalities" href="http://www.insee.fr/fr/methodes/nomenclatures/cog/comcan.asp?codedep={v.1}&amp;codecan={v.2}" />
61 </rule>
62 <rule>
63 <condition k="admin_level" v="7"/>
64 <condition k="ref:INSEE" v="(\p{Digit}{2})(\p{Digit}{1})"/>
65 <link name="View {name} map of cantons" href="http://www.insee.fr/fr/methodes/nomenclatures/cog/carte_canarr.asp?codearr={v}" />
66 <link name="View {name} list of cantons" href="http://www.insee.fr/fr/methodes/nomenclatures/cog/canarr.asp?codedep={v.1}&amp;codearr={v.2}" />
67 </rule>
68 <rule>
69 <condition k="admin_level" v="6"/>
70 <condition k="ref:INSEE" v="\p{Digit}{2}"/>
71 <link name="View {name} map of arrondissements" href="http://www.insee.fr/fr/methodes/nomenclatures/cog/carte_arrdep.asp?codedep={v}" />
72 <link name="View {name} list of arrondissements" href="http://www.insee.fr/fr/methodes/nomenclatures/cog/arrdep.asp?codedep={v}" />
73 </rule>
74 <rule>
75 <condition k="admin_level" v="4"/>
76 <condition k="ref:INSEE" v="\p{Digit}{2}"/>
77 <link name="View {name} map of departments" href="http://www.insee.fr/fr/methodes/nomenclatures/cog/carte_depreg.asp?codereg={v}" />
78 <link name="View {name} list of departments" href="http://www.insee.fr/fr/methodes/nomenclatures/cog/depreg.asp?codereg={v}" />
79 </rule>
80 <rule>
81 <condition k="admin_level" v="2"/>
82 <condition k="name" v="France*"/>
83 <link name="View {name} map of regions" href="http://www.insee.fr/fr/methodes/nomenclatures/cog/carte_regions.asp" />
84 <link name="View {name} list of regions" href="http://www.insee.fr/fr/methodes/nomenclatures/cog/region.asp" />
85 </rule>
86 </source>
87
88</tag2link>
Note: See TracBrowser for help on using the repository browser.