[GRASS-SVN] r57643 - grass-addons/grass6/vector/v.in.p190

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Sep 11 22:14:09 PDT 2013


Author: hamish
Date: 2013-09-11 22:14:09 -0700 (Wed, 11 Sep 2013)
New Revision: 57643

Modified:
   grass-addons/grass6/vector/v.in.p190/v.in.p190
Log:
update tech spec pdf url, add parsing filter- not sure if it is generally wanted so ifdef'd out

Modified: grass-addons/grass6/vector/v.in.p190/v.in.p190
===================================================================
--- grass-addons/grass6/vector/v.in.p190/v.in.p190	2013-09-11 23:54:04 UTC (rev 57642)
+++ grass-addons/grass6/vector/v.in.p190/v.in.p190	2013-09-12 05:14:09 UTC (rev 57643)
@@ -14,8 +14,9 @@
 #               for details.
 #
 #############################################################################
-# see ukooa_p1_90.pdf for P1/90 format spec:
-#  http://www.seg.org/SEGportalWEBproject/prod/SEG-Publications/Pub-Technical-Standards/Documents/ukooa_p1_90.pdf
+# see ukooa_p1_90.pdf for P1/90 format spec from http://www.seg.org, or
+#  http://www.epsg.org/p-formats/p-formats.html
+#  http://www.epsg.org/exchange/p1.pdf
 
 #%Module
 #% description: Extract 'Centre of Source' "S" coordinates from UKOOA P1/90 data files into CSV and import as GRASS vector points and lines maps.
@@ -152,6 +153,14 @@
      -e 's/|[ ]*/|/g' -e 's/[ ]*|/|/g' -e 's/|\r\?$//' \
      -e 's/^S//' >> "$TMP_POINTS_DATA"
 
+if [ "$NEEDED" = yes ] ; then
+    # some silly data don't 0 pad DD MM SS, so try to fix that
+    mv "$TMP_POINTS_DATA" "$TMP_POINTS_DATA".old
+    sed -e 's|: \([0-9]\)|:0\1|g' "$TMP_POINTS_DATA".old \
+         > "$TMP_POINTS_DATA"
+    rm -f "$TMP_POINTS_DATA".old
+fi
+
     # count number of columns in points file
     NUM_COL=`grep -v '^#\|^[ \t]*$' "$TMP_POINTS_DATA" | \
        head -n 1 | sed -e 's/[^|]//g' | wc -c`



More information about the grass-commit mailing list