[GRASS-dev] Creating location from file problem

Markus Neteler neteler at itc.it
Fri Oct 20 04:46:23 EDT 2006


together with Helena I tried to create new location from a file,
it fails if a datum should be asked:

> 1. Create new location from a file -
> I put the file at:
> http://skagit.meas.ncsu.edu/~helena/grasswork/grassbookdat/gdc.zip

When selecting the SHAPE file, the procedure in
calls g.proj. In this case, it wants to query the user for the
datum, but for that it has to be run in the xterm wrapper which
isn't the case yet.

I tried
diff -u -r1.5 file_option.tcl
--- file_option.tcl     19 Oct 2006 12:03:48 -0000      1.5
+++ file_option.tcl     20 Oct 2006 08:45:28 -0000
@@ -114,8 +114,7 @@
                        if {[file exists $filepath]== 1} {
                                if {[file exists $thelocation ]==0} {
                                        destroy .fileloc;
-                                       exec -- g.proj -c georef=$filepath location=$fileLocation >@stdout 2>@stderr;
-                                       destroy .fileloc
+                                       exec -- $env(GISBASE)/etc/grass-xterm-wrapper -e g.proj -c georef=$filepath location=$fileLocation;
                                        DialogGen .wrnDlg [G_msg "WARNING: restart GRASS please"] warning \
                                        [G_msg "WARNING: Please restart GRASS in order find the created location in the list (closing it for you now)"] \
                                                0 OK;

but the xterm window only flashes, then closes.

How to do it right?


More information about the grass-dev mailing list