Routino SVN Repository Browser

Check out the latest version of Routino: svn co http://routino.org/svn/trunk routino

ViewVC logotype

Contents of /trunk/xml/scripts/ride.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1520 - (show annotations) (download) (as text)
Sat Mar 8 19:36:35 2014 UTC (11 years ago) by amb
File MIME type: text/x-perl
File size: 1966 byte(s)
Update all Perl scripts to "use strict".

1 #!/usr/bin/perl
2 #
3 # Special case tagging rule generator.
4 #
5 # Part of the Routino routing software.
6 #
7 # This file Copyright 2011-2014 Andrew M. Bishop
8 #
9 # This program is free software: you can redistribute it and/or modify
10 # it under the terms of the GNU Affero General Public License as published by
11 # the Free Software Foundation, either version 3 of the License, or
12 # (at your option) any later version.
13 #
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU Affero General Public License for more details.
18 #
19 # You should have received a copy of the GNU Affero General Public License
20 # along with this program. If not, see <http://www.gnu.org/licenses/>.
21 #
22
23 use strict;
24
25 # Process the input
26
27 while(<STDIN>)
28 {
29 if(m%</way>%)
30 {
31 print " <!-- Special case for riding -->\n";
32 print "\n";
33 print " <if>\n";
34 print " <output k=\"foot\" v=\"no\"/>\n";
35 print " <output k=\"wheelchair\" v=\"no\"/>\n";
36 print " <output k=\"moped\" v=\"no\"/>\n";
37 print " <output k=\"motorcycle\" v=\"no\"/>\n";
38 print " <output k=\"motorcar\" v=\"no\"/>\n";
39 print " <output k=\"goods\" v=\"no\"/>\n";
40 print " <output k=\"hgv\" v=\"no\"/>\n";
41 print " <output k=\"psv\" v=\"no\"/>\n";
42 print "\n";
43 print " <output k=\"bridge\" v=\"no\"/>\n";
44 print " <output k=\"tunnel\" v=\"no\"/>\n";
45 print "\n";
46 print " <output k=\"footroute\" v=\"no\"/>\n";
47 print " </if>\n";
48 print "\n";
49 }
50
51 if(m%</relation>%)
52 {
53 print " <!-- Special case for riding -->\n";
54 print "\n";
55 print " <if>\n";
56 print " <output k=\"footroute\" v=\"no\"/>\n";
57 print " </if>\n";
58 print "\n";
59 }
60
61 print;
62 }

Properties

Name Value
svn:executable *