[GRASS-SVN] r33338 - grass/branches/develbranch_6/scripts/r.tileset
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Sep 8 21:59:06 EDT 2008
Author: hamish
Date: 2008-09-08 21:59:06 -0400 (Mon, 08 Sep 2008)
New Revision: 33338
Modified:
grass/branches/develbranch_6/scripts/r.tileset/r.tileset
Log:
* increase lat/lon precision to 0.1mm
* check if cs2cs worked
* simplify multiple sed calls
Modified: grass/branches/develbranch_6/scripts/r.tileset/r.tileset
===================================================================
--- grass/branches/develbranch_6/scripts/r.tileset/r.tileset 2008-09-08 21:37:59 UTC (rev 33337)
+++ grass/branches/develbranch_6/scripts/r.tileset/r.tileset 2008-09-09 01:59:06 UTC (rev 33338)
@@ -243,12 +243,19 @@
calculate p_x1 "$1 * $p_source_units"
calculate p_y1 "$2 * $p_source_units"
- message 3 "echo \"$p_x1 $p_y1\" | $CS2CS -f \"%f\" $p_source_proj +to $p_dest_proj"
+ message 3 "echo \"$p_x1 $p_y1\" | $CS2CS -f \"%.8f\" $p_source_proj +to $p_dest_proj"
- answer=`echo "$p_x1 $p_y1" | $CS2CS -f "%f" $p_source_proj +to $p_dest_proj`
+ answer=`echo "$p_x1 $p_y1" | $CS2CS -f "%.8f" $p_source_proj +to $p_dest_proj`
+
+ if [ $? -ne 0 ] ; then
+ g.message -e message="Problem running $CS2CS. <$answer>"
+ exit 1
+ fi
+
message 3 "$answer"
- eval `echo $answer | $SED "s/^/p_x2=/" | $SED "s/ /;p_y2=/" | $SED "s/ /;p_z2=/"`
-
+ # do not quote $answer in the following line
+ eval `echo $answer | $SED -e "s/^/p_x2=/" -e "s/ /;p_y2=/" -e "s/ /;p_z2=/"`
+
calculate p_x2 "$p_x2 / $p_dest_units"
calculate p_y2 "$p_y2 / $p_dest_units"
More information about the grass-commit
mailing list