[GRASS-windows] launching bash script

Moritz Lennert mlennert at club.worldonline.be
Tue Jan 22 12:21:15 EST 2008


On 22/01/08 13:52, Fabio D'Ovidio wrote:
> Yes, the script is v.coordinate...so i have decided to use Georectify tool.
> My problem now is that i have no much experience with GRASS GIS...
> How can I set XY location to import my no-georef. data?

When you launch GRASS in GUI mode:

Try this first:

1) Click on "Define new location with...Georeferenced file" (bottom right)
2) Enter name of new location
3) Browse to and select your non-referenced file
4) Click on "Define location"
5) Choose your new location and create a mapset
6) Enter GRASS

As your file is not referenced, this will create an XY location with a 
region of the extension of your map.


If that does not work:

1) Click on "Define new location with... Projection values" (bottom right)
2) Fill out LOCATION and MAPSET names
3) Press ESC then ENTER
4) Press ENTER ("would you like to create location")
5) Press ENTER ("do you have all this information")
6) Press A ("x,y")
7) Press ENTER ("x,y coordinate system")
8) Enter description
9) Press ENTER ("ok?")
10) Press ESC then ENTER (in the region extension dialog - just leave 
everything at the default value 1)
11) Press ENTER ("Do you accept this region")
12) Press ENTER
13) Press ESC the ENTER
14) Choose the newly created location and mapset
15) Enter GRASS

Now import your map:

1) File->Import Vector Map->Multiple formats using OGR (=v.in.ogr)
2) Enter all necessary parameters to import your non-referenced data 
(also check the option "Extend location extents based on new dataset" if 
you created the location in the second way)

Moritz



> 
> Moritz Lennert ha scritto:
>> On 22/01/08 11:48, Fabio D'Ovidio wrote:
>>> Hi!
>>> I have installing wingrass on Windows XP following:
>>> http://geog-pc40.ulb.ac.be/grass/wingrass/README
>>>
>>> I have installed msys...and configured it in grass.bat
>>>
>>> I have to work with v.coordinate script...how can I lauch it as a 
>>> bash script?
>>
>> I imagine the script attached to this mail:
>> http://www.mail-archive.com/grass-italia@listserv.unipr.it/msg00440.html
>>
>> Before answering your question: my Italian is not good enough to 
>> really understand what this script does, but I having the feeling it 
>> reproduces what the "georectify" tool does when you decide to rectify 
>> a vector. So maybe you can just use that.
>>
>> Probably the easiest way to launch a bash script with native wingrass 
>> is to launch grass from within the msys shell:
>>
>> 1) Open msys shell
>> 2) type /c/grass/bin/grass (not grass.bat ! - adapt path to your 
>> situation)
>> 3) launch gis.m
>>
>> Or, if your grass.bat is correctly configured (path to sh.exe set and 
>> path to msys/bin and msys/lib set) you can do it from within a cmd.exe 
>> window:
>>
>> 1) Open cmd.exe
>> 2) Launch grass in text mode: c:\grass\bin\grass.bat -text
>> 3) Launch the script from the command line
>>
>> Or, if the script is in your PATH:
>>
>> 1) Launch grass in gui mode
>> 2) type script name in console part of the Output window
>>
>> However, v.coordinate will not work in windows since it uses 
>> x-monitors. These are not supported in wingrass. So, I guess you 
>> really should try with the georectify tool (in the File menu).
>>
>> Moritz
>>
>>
> 



More information about the grass-windows mailing list