[GRASS-user] v.to.rast conversion

Giacomo Piva piva at meeo.it
Wed Dec 9 11:41:09 EST 2009


Hi all,
I have already read and tested how to integrate the GRASS modules on a 
BASH script as Markus suggested.
I'm running GRASS 6.4RC5 version.

I should convert a shapefile given in the Italian projection system 
(Gauss-Boaga) into a raster file (GeoTIFF format) at a given resolution.
I have tried to use the v.to.rast module, but it first requires the 
import module v.in.ogr.
So, I found some troubles in the region defining.

I've tried to set it manually with the command:
g.region s=... n=... e=.. w=..

But the command returns the following error:
ERROR: default region is not set.

I've tried also other solutions, as the command:  
g.region vect="path/to/file.shp" 

But it returns the same error.

Could anyone give me any suggestions?
Thank you.

-- 
Giacomo 


Markus Metz wrote:
> Hi Giacomo,
>
> are you by any chance running this command outside a GRASS session? If 
> grass is running, there is no need to give the full path, typing
>
> v.to.rast help
>
> in the terminal where grass is running is enough. Also, grass should 
> know where to look for libgrass_vect.so, no need to run ldconfig. If 
> you really want to use grass modules outside a standard grass session, 
> see the grass book [1], third edition, page 338, 9.3 Automated usage 
> of GRASS.
>
> Hope that helps,
>
> Markus M
>
> [1] http://www.grassbook.org/





More information about the grass-user mailing list