[SCM] rel2gpx branch, master, updated. 8d846f1eb5a17fef4b2a164fa995b61f1522fa63

Andreas Tille tille at debian.org
Sun Sep 15 20:14:16 UTC 2013


The following commit has been merged in the master branch:
commit 97d405cc0a87e3b2cb5e99958ad6acf819ff132b
Author: Andreas Tille <tille at 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 <tille at 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



More information about the Pkg-grass-devel mailing list