The following commit has been merged in the master branch:
commit 97d405cc0a87e3b2cb5e99958ad6acf819ff132b
Author: Andreas Tille <ti...@debian.org>
Date:   Fri Sep 13 22:47:09 2013 +0200

    Do not cause an error message when distance are properly specified.

diff --git a/debian/patches/properly_handle_distances.patch 
b/debian/patches/properly_handle_distances.patch
new file mode 100644
index 0000000..5a34f15
--- /dev/null
+++ b/debian/patches/properly_handle_distances.patch
@@ -0,0 +1,24 @@
+Author: Andreas Tille <ti...@debian.org>
+Date: Thu, 12 Sep 2013 21:34:03 +0200
+Description: according to http://wiki.openstreetmap.org/wiki/Walking_Routes:
+ 'Given including a unit and with a dot for decimals. (e.g. "12.5km")'
+ Prevent error when distances are properly specified
+
+--- a/rel2gpx.pl
++++ b/rel2gpx.pl
+@@ -1879,9 +1879,14 @@ sub loadOsm{
+          print "  ", $LH->maketext("Fehler: Relation [_1] existiert nicht", 
$relId), "\n";
+          next;
+       }
++      # according to http://wiki.openstreetmap.org/wiki/Walking_Routes:
++      # Given including a unit and with a dot for decimals. (e.g. "12.5km")
++      if ($relDistance =~ /^([.\d]+)\s*km/) {
++         $relDistance = $1;
++      }
+       print $LH->maketext("Name:"),"     $relName\n";
+       print $LH->maketext("Ref: "),"     $relRef\n";
+-      print $LH->maketext("Dist:"),"     $relDistance\n";
++      print $LH->maketext("Dist:"),"     ${relDistance}km\n";
+       print "\n";
+       $fn = $relName;
+       $fn =~ tr/ /_/;
diff --git a/debian/patches/series b/debian/patches/series
index eb9d1c7..4baf145 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 ##omit_defined.patch
+properly_handle_distances.patch

-- 
create GPX-Tracks from OSM relation

_______________________________________________
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel

Reply via email to