[GRASS-SVN] r31849 - grass-addons/vector/v.out.ascii.mat
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Jun 26 03:13:42 EDT 2008
Author: hamish
Date: 2008-06-26 03:13:41 -0400 (Thu, 26 Jun 2008)
New Revision: 31849
Modified:
grass-addons/vector/v.out.ascii.mat/v.out.ascii.mat
Log:
add a flag to make continuous polylines
Modified: grass-addons/vector/v.out.ascii.mat/v.out.ascii.mat
===================================================================
--- grass-addons/vector/v.out.ascii.mat/v.out.ascii.mat 2008-06-26 06:36:51 UTC (rev 31848)
+++ grass-addons/vector/v.out.ascii.mat/v.out.ascii.mat 2008-06-26 07:13:41 UTC (rev 31849)
@@ -37,6 +37,10 @@
#% description: Name for output map (omit for display to stdout)
#% required : no
#%end
+#%flag
+#% key: j
+#% description: Join into continuous polygons
+#%end
##%option
##% key: type
@@ -78,13 +82,23 @@
cleanup()
{
rm -f "${TMP}"
+ if [ "$GIS_FLAG_J" -eq 1 ] ; then
+ g.remove vect="tmp_voam_$$" --quiet
+ fi
}
#### trap ctrl-c so that we can clean up tmp
trap 'cleanup' 2 3 15
+if [ "$GIS_FLAG_J" -eq 1 ] ; then
+ v.build.polylines in="$GIS_OPT_INPUT" out="tmp_voam_$$" --quiet
+ INPUT="tmp_voam_$$"
+else
+ INPUT="$GIS_OPT_INPUT"
+fi
+
MAP_IS_3D=`v.info "$GIS_OPT_INPUT" | grep "Map is 3D" | cut -f2 -d: | awk '{print $1}'`
if [ "$MAP_IS_3D" -eq 0 ] ; then
@@ -94,7 +108,7 @@
fi
-v.out.ascii in="$GIS_OPT_INPUT" format=standard | tail -n +11 | \
+v.out.ascii in="$INPUT" format=standard | tail -n +11 | \
awk -v NAN_STR="$NAN_STR" -v IS_3D="$MAP_IS_3D" \
'BEGIN { print NAN_STR; VERT=0 }
{
More information about the grass-commit
mailing list