[GRASS-SVN] r43357 - in grass/branches/develbranch_6/scripts:
v.in.garmin v.in.gpsbabel
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Aug 31 01:59:14 EDT 2010
Author: hamish
Date: 2010-08-31 05:59:14 +0000 (Tue, 31 Aug 2010)
New Revision: 43357
Modified:
grass/branches/develbranch_6/scripts/v.in.garmin/v.in.garmin
grass/branches/develbranch_6/scripts/v.in.gpsbabel/v.in.gpsbabel
Log:
survive cs2cs + spaces in NTv2 grid file pathnames; incr. gpsbabel coord prec to %.9f for lat/long
Modified: grass/branches/develbranch_6/scripts/v.in.garmin/v.in.garmin
===================================================================
--- grass/branches/develbranch_6/scripts/v.in.garmin/v.in.garmin 2010-08-31 04:24:02 UTC (rev 43356)
+++ grass/branches/develbranch_6/scripts/v.in.garmin/v.in.garmin 2010-08-31 05:59:14 UTC (rev 43357)
@@ -456,7 +456,8 @@
cp "${TEMPFILE}.base" "${TEMPFILE}.P_base"
else
g.message "Attempting waypoint projection transform with cs2cs..."
- cs2cs -f %.7f $IN_PROJ +to $OUT_PROJ < "${TEMPFILE}.base" > "${TEMPFILE}.P_base"
+ eval cs2cs -f %.7f $IN_PROJ +to `echo $OUT_PROJ` \
+ < "${TEMPFILE}.base" > "${TEMPFILE}.P_base"
EXITCODE=$?
# check if transform REALLY worked (e.g. grid file not found)
BAD_PTS="`grep -c "^\*" "${TEMPFILE}.P_base"`"
@@ -664,7 +665,8 @@
$1!="L" { printf(" %.7f %.7f\n", $1, $2) } END {;}' > "${TEMPFILE}.P_base"
else
g.message "Attempting waypoint projection transform with cs2cs..."
- cs2cs -tL -f %.7f $IN_PROJ +to $OUT_PROJ < "${TEMPFILE}.base" > "${TEMPFILE}.P_mid"
+ eval cs2cs -tL -f %.7f $IN_PROJ +to `echo $OUT_PROJ` \
+ < "${TEMPFILE}.base" > "${TEMPFILE}.P_mid"
EXITCODE=$?
# check if transform REALLY worked (e.g. grid file not found)
BAD_PTS="`grep -c "^\*" "${TEMPFILE}.P_mid"`"
Modified: grass/branches/develbranch_6/scripts/v.in.gpsbabel/v.in.gpsbabel
===================================================================
--- grass/branches/develbranch_6/scripts/v.in.gpsbabel/v.in.gpsbabel 2010-08-31 04:24:02 UTC (rev 43356)
+++ grass/branches/develbranch_6/scripts/v.in.gpsbabel/v.in.gpsbabel 2010-08-31 05:59:14 UTC (rev 43357)
@@ -322,8 +322,12 @@
cp "${TEMPFILE}.base" "${TEMPFILE}.P_base"
else
g.message "Attempting waypoint projection transform with cs2cs"
- cs2cs -f %.7f $IN_PROJ +to $OUT_PROJ < "${TEMPFILE}.base" > "${TEMPFILE}.P_base"
+
+ eval cs2cs -f %.9f `echo $IN_PROJ` +to `echo $OUT_PROJ` \
+ < "${TEMPFILE}.base" > "${TEMPFILE}.P_base"
+
EXITCODE=$?
+
# check if transform REALLY worked (e.g. when the grid file is not found)
BAD_PTS="`grep -c "^\*" "${TEMPFILE}.P_base"`"
if [ "$BAD_PTS" -gt 0 ] ; then
@@ -589,10 +593,14 @@
$1!="L" { " %s %s\n", $1, $2) } END {;}' > "${TEMPFILE}.P_base"
else
g.message "Attempting waypoint projection transform with cs2cs"
- cs2cs -tL -f %.7f $IN_PROJ +to $OUT_PROJ < "${TEMPFILE}.base" > "${TEMPFILE}.P_mid"
+
+ eval cs2cs -tL -f %.9f `echo $IN_PROJ` +to `echo $OUT_PROJ` \
+ < "${TEMPFILE}.base" > "${TEMPFILE}.P_mid"
+
EXITCODE=$?
- # check if transform REALLY worked (e.g. grid file not found)
- BAD_PTS="`grep -c "^\*" "${TEMPFILE}.P_mid"`"
+
+ # check if transform REALLY worked (e.g. grid file not found)
+ BAD_PTS="`grep -c "^\*" "${TEMPFILE}.P_mid"`"
if [ "$BAD_PTS" -gt 0 ] ; then
g.message message=""
g.message -w "$BAD_PTS vertices failed reprojection."
More information about the grass-commit
mailing list