[GRASS-SVN] r34879 - grass/branches/develbranch_6/scripts/v.to.3d
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Dec 14 14:32:54 EST 2008
Author: martinl
Date: 2008-12-14 14:32:54 -0500 (Sun, 14 Dec 2008)
New Revision: 34879
Modified:
grass/branches/develbranch_6/scripts/v.to.3d/description.html
grass/branches/develbranch_6/scripts/v.to.3d/v.to.3d
Log:
v.to.3d: check if input vector map is 2D
Modified: grass/branches/develbranch_6/scripts/v.to.3d/description.html
===================================================================
--- grass/branches/develbranch_6/scripts/v.to.3d/description.html 2008-12-14 19:26:23 UTC (rev 34878)
+++ grass/branches/develbranch_6/scripts/v.to.3d/description.html 2008-12-14 19:32:54 UTC (rev 34879)
@@ -8,7 +8,6 @@
<h2>TODO</h2>
<ul>
- <li>Check if input vector map is already 3D</li>
<li>Implement reverse transformation</li>
<li>Some examples</li>
</ul>
Modified: grass/branches/develbranch_6/scripts/v.to.3d/v.to.3d
===================================================================
--- grass/branches/develbranch_6/scripts/v.to.3d/v.to.3d 2008-12-14 19:26:23 UTC (rev 34878)
+++ grass/branches/develbranch_6/scripts/v.to.3d/v.to.3d 2008-12-14 19:32:54 UTC (rev 34879)
@@ -79,6 +79,13 @@
exec g.parser "$0" "$@"
fi
+map3d=` v.info "$GIS_OPT_INPUT" -t | grep map3d | cut -d'=' -f2`
+
+if [ "$map3d" -eq "1" ] ; then
+ g.message -e "Vector map <$GIS_OPT_INPUT> is 3D"
+ exit 1
+fi
+
if [ -n "$GIS_OPT_HEIGHT" ] ; then
if [ -n "$GIS_OPT_COLUMN" ] ; then
g.message -e "Either 'height' or 'column' parameter have to be used"
More information about the grass-commit
mailing list