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/drive.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, 1 month ago) by amb
File MIME type: text/x-perl
File size: 1734 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 motor vehicles -->\n";
32 print "\n";
33 print " <if>\n";
34 print " <output k=\"foot\" v=\"no\"/>\n";
35 print " <output k=\"horse\" v=\"no\"/>\n";
36 print " <output k=\"wheelchair\" v=\"no\"/>\n";
37 print " <output k=\"bicycle\" v=\"no\"/>\n";
38 print "\n";
39 print " <output k=\"bridge\" v=\"no\"/>\n";
40 print " <output k=\"tunnel\" v=\"no\"/>\n";
41 print " </if>\n";
42 print "\n";
43 }
44
45 if(m%</relation>%)
46 {
47 print " <!-- Special case for motor vehicles -->\n";
48 print "\n";
49 print " <if>\n";
50 print " <output k=\"footroute\" v=\"no\"/>\n";
51 print " <output k=\"bicycleroute\" v=\"no\"/>\n";
52 print " </if>\n";
53 print "\n";
54 }
55
56 print;
57 }

Properties

Name Value
svn:executable *