Hi Markus,

On 2017-03-05 at 17:50, Markus Neteler <[email protected]> wrote:
> On Sun, Mar 5, 2017 at 1:53 AM, Ken Mankoff <[email protected]> wrote:
>> I'd like to manually select a region of an image. It seems like the
>> g.gui.vdigit tool might be the right way to do this. However, when I
>> run it I get the following message:
>>
>> ERROR: Vector digitizer not available. cannot import name GV_LINES
>
> Strange, please post a bit more about version and operating system.

OS X
GRASS 7.2
Built as per 
https://grasswiki.osgeo.org/wiki/Compiling_on_MacOSX_using_homebrew#GRASS_7.2

>> Is there another tool that will let me select a region?
>
> Starting from GRASS GIS 7.2 there is a raster digitizer (find it in
> the drop-down list in the Map Display Window of the GUI).
>
> See also at the end of this section:
> https://grass.osgeo.org/grass72/manuals/wxGUI.html#map-display-window

I did not know about that "raster digitizer". Thank you. When I try to use it, 
wherever I click I just get a popup message, "Message. Please select first the 
raster map". I'm not sure what to do about that.


To explain my use case more clearly, I'm using the CLI not the GUI. I'm looping 
over ~100 maps that need the user to select a location in each one. I currently 
have this code (in a loop):


d.mon start=wx0
sleep 5
d.rgb red=R green=G blue=B
d.grid size=500 origin=${X},${Y}
d.vect table@RS where="scene == '${SCENE}'" color=red

read -n 1 -s -p "right click on monitor wx0 and select 'copy coordinates to 
clipboard', then press any key to continue"

d.mon stop=wx0
ice_x=$(echo $(pbpaste) | cut -d"," -f1)
ice_y=$(echo $(pbpaste) | cut -d"," -f2)


I think this might work in a GRASS script but my workflow sends this to a 
buffer in emacs, effectively as a cut-and-paste job. Therefore the text after 
the "read" command (d.mon stop=wx0) is interpreted as input, and I don't get a 
chance to click on the map. If I could use the "d.where" from grass64, and have 
the "d.where" command block input until the mouse is clicked, everything would 
work. I'm hoping to replicate this functionality in grass7.2

  -k.

_______________________________________________
grass-user mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to