[GRASS-user] v.coordinate.sh - improve this script?

Michael Barton michael.barton at asu.edu
Thu Jan 24 10:28:56 EST 2008


On Jan 24, 2008, at 6:52 AM, grass-user-request at lists.osgeo.org wrote:

> Date: Thu, 24 Jan 2008 05:12:03 -0800 (PST)
> From: "Gabriele N." <gis.gn at libero.it>
> Subject: [GRASS-user] v.coordinate.sh - improve this script?
> To: grass-user at lists.osgeo.org
> Message-ID: <15063748.post at talk.nabble.com>
> Content-Type: text/plain; charset=us-ascii
>
>
> Hi list.
> I made a script (attached) for the definition of interactive text file
> (containing the coordinates input and output) to be loaded later in
> v.transform.
>
> It is useful to write automatically coordinates in the text file.
>
> Operation is simple:
> - A load map (not georeference) and the map B (which may be raster or
> vector) and will open 2 monitor.
>
> - We need to move the first monitor to the side of the second monitor.
>
> - Proceed doing a zoom (if necessary) on the first monitor (A map)  
> and then
> identifying the input point (GCP) with one click. After this  
> transaction
> will be made to locate the point on the second monitor (B map).
> The pairs of points are identifying 4 (at least 4). For more points  
> see a
> graphic which will require to continue with the process or not.
>
> - After the inclusion of the points in your / home will be a text file
> 'coordinate.txt' formatted for use in v.transform.
>
>
> The script is certainly improved. For example viewing points  
> included (as eg
> in i.points on in d.path) or shifting automatically monitors or  
> using snap
> for the insertion points etc. ...
>
> I have no programming experience, and I hope that someone can help me
> improve.
>
> Gabriele
>
> PS
> Necessary installing xdialog and xmessage
> 		
> http://www.nabble.com/file/p15063748/v.coordinate.sh v.coordinate.sh
> -- 
> View this message in context: http://www.nabble.com/ 
> v.coordinate.sh---improve-this-script--tp15063748p15063748.html
> Sent from the Grass - Users mailing list archive at Nabble.com.

Gabriele,

It is good to learn scripting of some kind because it really expands  
the analytical capabilities of GRASS. However, I'm not sure why you  
are trying to create a bash script for interactive georectifying.

i.points already does with with xmonitors. However, this will not  
work on Windows because it doesn't support the underlying socket code  
for the monitor drivers.

The TclTk GUI already has a more sophisticated replacement for this  
function that works on all platforms.

Also, given issues (long known) that we've run into again with  
running bash scripts on Windows, I think that now is the time to  
begin to strongly encourage GRASS users and developers to try to  
begin shifting their scripting to a platform that works on all OS's.  
Since the new GUI will be in Python, I strongly suggest that we start  
developing new scripts in Python and for anyone with time on their  
hands ;-) start to create Python versions of existing scripts. The  
more scripts that are available in Python, the more people will make  
sure that Python is installed and will take a look at it, which will  
lead to more scripts in Python, etc...

Already, a Python script can pop up the same TclTk GUI that a bash  
script can, and has the option of popping up a wxPython GUI if this  
is installed.

Michael

____________________
C. Michael Barton, Professor of Anthropology
Director of Graduate Studies
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

Phone: 480-965-6262
Fax: 480-965-7671
www: <www.public.asu.edu/~cmbarton>


More information about the grass-user mailing list