[GRASS-SVN] r33339 - grass/trunk/scripts/r.tileset
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Sep 8 22:04:20 EDT 2008
Author: hamish
Date: 2008-09-08 22:04:20 -0400 (Mon, 08 Sep 2008)
New Revision: 33339
Modified:
grass/trunk/scripts/r.tileset/r.tileset
Log:
* increase lat/lon precision to 0.1mm
* check if cs2cs worked
* simplify multiple sed calls
(merge from devbr6)
Modified: grass/trunk/scripts/r.tileset/r.tileset
===================================================================
--- grass/trunk/scripts/r.tileset/r.tileset 2008-09-09 01:59:06 UTC (rev 33338)
+++ grass/trunk/scripts/r.tileset/r.tileset 2008-09-09 02:04:20 UTC (rev 33339)
@@ -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