[GRASS-SVN] r56809 - in grass-addons/grass6/display: . d.mark d.shortcuts

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Jun 19 20:27:10 PDT 2013


Author: hamish
Date: 2013-06-19 20:27:09 -0700 (Wed, 19 Jun 2013)
New Revision: 56809

Added:
   grass-addons/grass6/display/d.mark/
   grass-addons/grass6/display/d.mark/Makefile
   grass-addons/grass6/display/d.mark/d.mark
   grass-addons/grass6/display/d.mark/description.html
Removed:
   grass-addons/grass6/display/d.shortcuts/d.mark
Log:
move d.mark out on its own

Copied: grass-addons/grass6/display/d.mark/Makefile (from rev 56567, grass-addons/grass6/display/d.anaglyph/Makefile)
===================================================================
--- grass-addons/grass6/display/d.mark/Makefile	                        (rev 0)
+++ grass-addons/grass6/display/d.mark/Makefile	2013-06-20 03:27:09 UTC (rev 56809)
@@ -0,0 +1,7 @@
+MODULE_TOPDIR = ../..
+
+PGM = d.mark
+
+include $(MODULE_TOPDIR)/include/Make/Script.make
+
+default: script

Copied: grass-addons/grass6/display/d.mark/d.mark (from rev 56765, grass-addons/grass6/display/d.shortcuts/d.mark)
===================================================================
--- grass-addons/grass6/display/d.mark/d.mark	                        (rev 0)
+++ grass-addons/grass6/display/d.mark/d.mark	2013-06-20 03:27:09 UTC (rev 56809)
@@ -0,0 +1,141 @@
+#!/bin/sh
+# d.mark - quickly display site data in a nice way
+#
+# COPYRIGHT:	(c) 2007-2013 by Hamish Bowman
+#
+#	This program is free software under the GNU General Public
+#	License (>=v2). Read the file COPYING that comes with GRASS
+#	for details.
+#
+
+#%Module
+#% description: Quickly display a marker on the display monitor
+#%End
+#%option
+#% key: at
+#% type: double
+#% key_desc: x,y
+#% description: Placement coordinates (in percentage, 0,0 is lower left)
+#% required : yes
+#%end
+#%option
+#% key: symbol
+#% type: string
+#% key_desc: name
+#% description: Basic symbol to use
+#% answer: triangle
+#% options: 4pt_star,adcp,airport,alpha_flag,arrow1,arrow2,box,bridge,circle,compass,cross1,cross2,diamond,dive_flag,fancy_compass,fiducial,fish,half-arrow_left,half-arrow_right,half-box,half-circle,marker,muchomurka,n_arrow1,n_arrow1b,n_arrow2,n_arrow3,n_arrow4,n_arrow5,n_arrow6,n_arrow7a,n_arrow7b,n_arrow8,octagon,offbox_ne,offbox_nw,offbox_se,offbox_sw,pentagon,ping,point,pushpin,ring,smrk,star,strike_box,strike_circle,strike_half-bowtie,strike_line,strike_triangle,target,triangle,x
+#% required : no
+#%end
+#%option
+#% key: color
+#% type: string
+#% description: Symbol outline color
+#% gisprompt: color,grass,color
+#% answer: black
+#% required : no
+#%end
+#%option
+#% key: fcolor
+#% type: string
+#% description: Symbol fill color
+#% gisprompt: color,grass,color
+#% answer: yellow
+#% required : no
+#%end
+#%option
+#% key: size
+#% type: integer
+#% description: Symbol size
+#% answer: 12
+#% required : no
+#%end
+#%option
+#% key: rotation
+#% type: double
+#% description: Rotation angle in degrees (counter-clockwise)
+#% answer: 0
+#% required : no
+#%end
+#%option
+#% key: width
+#% type: double
+#% description: Line width
+#% answer: 0
+#% required : no
+#%end
+#%flag
+#% key: m
+#% description: Coordinates are given in map units
+#%end
+
+if [ -z $GISBASE ] ; then
+        echo "You have to be in GRASS to use this."
+        exit
+fi
+
+if [ "$1" != "@ARGS_PARSED@" ] ; then
+    exec g.parser "$0" "$@"
+fi
+
+
+COORD=`echo "$GIS_OPT_AT" | tr ',' ' '`
+SYMBOL=`basename "$GIS_OPT_SYMBOL"`
+
+if [ $GIS_FLAG_M -eq 0 ] ; then
+    MAPUN=""
+
+    COORD_x=`echo $COORD | cut -f1 -d' ' | cut -f1 -d'.'`
+    if [ "$COORD_x" -lt -40 ] || [ "$COORD_x" -gt 140 ] ; then
+	g.message "Pretty big value for % of frame. Did you mean to use the -m flag?"
+    fi
+else
+    MAPUN="-m"
+fi
+
+
+if [ "$GIS_OPT_WIDTH" != "0" ] ; then
+   DOWIDTH="width $GIS_OPT_WIDTH"
+else
+   DOWIDTH=""
+fi
+
+if [ "$GIS_OPT_ROTATION" != "0" ] ; then
+   DOROT="rotation $GIS_OPT_ROTATION"
+else
+   DOROT=""
+fi
+
+# uncomment to generate #%options: list
+#  for file in `find "$GISBASE/etc/symbol/" -type f`; do
+#     basename "$file"
+#  done | sort | grep -v '~$' | tr '\n' ',' | sed -e 's/,$//'
+#
+
+ICONS=$(
+  for file in `find "$GISBASE/etc/symbol/" -type f`; do
+     basename "$file"
+  done
+)
+
+if [ `echo "$ICONS" | tr ' ' '\n' | grep -c "^$SYMBOL$"` -ne 1 ] ; then
+    g.message -e "Trouble finding symbol \"$SYMBOL\""
+    exit 1
+fi
+
+GROUPDIR=$(dirname `find "$GISBASE/etc/symbol/" -type f -name "$SYMBOL"`)
+GROUP=`basename "$GROUPDIR"`
+if [ -z "$GROUP" ] ; then
+    g.message -e "Trouble locating symbol \"$GROUP/$SYMBOL\""
+    exit 1
+fi
+g.message -d "selected symbol: [$GROUP/$SYMBOL]"
+
+
+(
+cat << EOF
+$DOWIDTH
+$DOROT
+symbol $GROUP/$SYMBOL $GIS_OPT_SIZE $COORD $GIS_OPT_COLOR $GIS_OPT_FCOLOR
+EOF
+) | d.graph $MAPUN

Added: grass-addons/grass6/display/d.mark/description.html
===================================================================
--- grass-addons/grass6/display/d.mark/description.html	                        (rev 0)
+++ grass-addons/grass6/display/d.mark/description.html	2013-06-20 03:27:09 UTC (rev 56809)
@@ -0,0 +1,52 @@
+<h2>DESCRIPTION</h2>
+
+<em>d.mark</em> will quickly display a marker on the active display
+monitor at the chosen position. Placement can be given either as a
+percentage of the screen dimensions (default), or with absolute map
+coordinates if the <b>-m</b> flag is used.
+<p>
+The default marker is a yellow triangle, but the usual symbol control and 
+color options are available, including line width and symbol rotation.
+
+
+<h2>NOTES</h2>
+
+All standard GRASS symbols are available, just the name is needed
+the symbol group will be found automatically.
+<p>
+Marks are not saved to the Xmonitor history and will not survive
+<em>d.redraw</em> or a resize of the Xmon window.
+
+
+<h2>EXAMPLE</h2>
+
+Draw a north arrow in the bottom right of the map display:
+<div class="code"><pre>
+  d.mark at=90,10 symbol=n_arrow4 fcolor=black
+</pre></div>
+
+Place a "X" at the coordinate <tt>596236,4921390</tt>:
+<div class="code"><pre>
+  d.mark -m at=596236,4921390 symbol=cross2 size=16 rotation=45
+</pre></div>
+
+
+<h2>SEE ALSO</h2>
+
+<em>
+<a href="d.graph.html">d.graph</a>
+</em>
+<br>
+The <a href="http://grasswiki.osgeo.org/wiki/IconSymbols">Icons and
+Symbols</a> page on the GRASS Wiki
+
+
+<h2>AUTHOR</h2>
+
+Hamish Bowman<br> <i>
+Department of Marine Science<br>
+University of Otago<br>
+New Zealand</i>
+
+<p>
+<i>Last changed: $Date$</i></p>


Property changes on: grass-addons/grass6/display/d.mark/description.html
___________________________________________________________________
Added: svn:mime-type
   + text/html
Added: svn:keywords
   + Author Date Id
Added: svn:eol-style
   + native

Deleted: grass-addons/grass6/display/d.shortcuts/d.mark
===================================================================
--- grass-addons/grass6/display/d.shortcuts/d.mark	2013-06-20 03:05:07 UTC (rev 56808)
+++ grass-addons/grass6/display/d.shortcuts/d.mark	2013-06-20 03:27:09 UTC (rev 56809)
@@ -1,141 +0,0 @@
-#!/bin/sh
-# d.mark - quickly display site data in a nice way
-#
-# COPYRIGHT:	(c) 2007-2013 by Hamish Bowman
-#
-#	This program is free software under the GNU General Public
-#	License (>=v2). Read the file COPYING that comes with GRASS
-#	for details.
-#
-
-#%Module
-#% description: Quickly display a marker on the display monitor
-#%End
-#%option
-#% key: at
-#% type: double
-#% key_desc: x,y
-#% description: Placement coordinates (in percentage, 0,0 is lower left)
-#% required : yes
-#%end
-#%option
-#% key: symbol
-#% type: string
-#% key_desc: name
-#% description: Basic symbol to use
-#% answer: triangle
-#% options: 4pt_star,adcp,airport,alpha_flag,arrow1,arrow2,box,bridge,circle,compass,cross1,cross2,diamond,dive_flag,fancy_compass,fiducial,fish,half-arrow_left,half-arrow_right,half-box,half-circle,marker,muchomurka,n_arrow1,n_arrow1b,n_arrow2,n_arrow3,n_arrow4,n_arrow5,n_arrow6,n_arrow7a,n_arrow7b,n_arrow8,octagon,offbox_ne,offbox_nw,offbox_se,offbox_sw,pentagon,ping,point,pushpin,ring,smrk,star,strike_box,strike_circle,strike_half-bowtie,strike_line,strike_triangle,target,triangle,x
-#% required : no
-#%end
-#%option
-#% key: color
-#% type: string
-#% description: Symbol outline color
-#% gisprompt: color,grass,color
-#% answer: black
-#% required : no
-#%end
-#%option
-#% key: fcolor
-#% type: string
-#% description: Symbol fill color
-#% gisprompt: color,grass,color
-#% answer: yellow
-#% required : no
-#%end
-#%option
-#% key: size
-#% type: integer
-#% description: Symbol size
-#% answer: 12
-#% required : no
-#%end
-#%option
-#% key: rotation
-#% type: double
-#% description: Rotation angle in degrees (counter-clockwise)
-#% answer: 0
-#% required : no
-#%end
-#%option
-#% key: width
-#% type: double
-#% description: Line width
-#% answer: 0
-#% required : no
-#%end
-#%flag
-#% key: m
-#% description: Coordinates are given in map units
-#%end
-
-if [ -z $GISBASE ] ; then
-        echo "You have to be in GRASS to use this."
-        exit
-fi
-
-if [ "$1" != "@ARGS_PARSED@" ] ; then
-    exec g.parser "$0" "$@"
-fi
-
-
-COORD=`echo "$GIS_OPT_AT" | tr ',' ' '`
-SYMBOL=`basename "$GIS_OPT_SYMBOL"`
-
-if [ $GIS_FLAG_M -eq 0 ] ; then
-    MAPUN=""
-
-    COORD_x=`echo $COORD | cut -f1 -d' ' | cut -f1 -d'.'`
-    if [ "$COORD_x" -lt -40 ] || [ "$COORD_x" -gt 140 ] ; then
-	g.message "Pretty big value for % of frame. Did you mean to use the -m flag?"
-    fi
-else
-    MAPUN="-m"
-fi
-
-
-if [ "$GIS_OPT_WIDTH" != "0" ] ; then
-   DOWIDTH="width $GIS_OPT_WIDTH"
-else
-   DOWIDTH=""
-fi
-
-if [ "$GIS_OPT_ROTATION" != "0" ] ; then
-   DOROT="rotation $GIS_OPT_ROTATION"
-else
-   DOROT=""
-fi
-
-# uncomment to generate #%options: list
-#  for file in `find "$GISBASE/etc/symbol/" -type f`; do
-#     basename "$file"
-#  done | sort | grep -v '~$' | tr '\n' ',' | sed -e 's/,$//'
-#
-
-ICONS=$(
-  for file in `find "$GISBASE/etc/symbol/" -type f`; do
-     basename "$file"
-  done
-)
-
-if [ `echo "$ICONS" | tr ' ' '\n' | grep -c "^$SYMBOL$"` -ne 1 ] ; then
-    g.message -e "Trouble finding symbol \"$SYMBOL\""
-    exit 1
-fi
-
-GROUPDIR=$(dirname `find "$GISBASE/etc/symbol/" -type f -name "$SYMBOL"`)
-GROUP=`basename "$GROUPDIR"`
-if [ -z "$GROUP" ] ; then
-    g.message -e "Trouble locating symbol \"$GROUP/$SYMBOL\""
-    exit 1
-fi
-g.message -d "selected symbol: [$GROUP/$SYMBOL]"
-
-
-(
-cat << EOF
-$DOWIDTH
-$DOROT
-symbol $GROUP/$SYMBOL $GIS_OPT_SIZE $COORD $GIS_OPT_COLOR $GIS_OPT_FCOLOR
-EOF
-) | d.graph $MAPUN



More information about the grass-commit mailing list