[GRASSLIST:3247] Re: creating new mapset/location in batch-mode

Jan Hartmann j.l.h.hartmann at uva.nl
Wed Apr 21 05:32:51 EDT 2004

Kinberger Michaela wrote:

> We are working on an internet application which uses grass for 
> interpolation (idw).
> The user can select the kind of point data to send to grass. Now a 
> shellscript will be executet to get
> back a .tif +  .tfw  viewd  by  the  umn  mapserver.
> what happens when  two users start one grass location with the same 
> mapset at the same time.
> is it possible to start idw two times with different mapsets but the 
> same location and how can i create
> a new mapset/location in batchmode.

Normally, on a single system, GRASS can only be used by one user at the 
same time. You can disable this by commenting out a few lines in 
grass5/etc/Init.sh, but this is dangerous. The working mapset and region 
are stored on disk, so the mapset of the second concurrent user will 
become automatically that of the first one, and every change of region 
will apply to all users. If both remain the same, it should be possible 
to use GRASS simultaneously. I think that is the case with r.surf.idw.

I have been struggling with this problem in the same situation as you: 
using GRASS as a backend for web-based MapServer applications. This hack 
works for me, but it would be nice if GRASS could be really used in 
parallel. I am not sure how difficult this would be to implement however.

BTW: MapServer can read GRASS datasets directly. This is slightly slower 
than reading tiff files, but certainly faster than converting GRASS 
datasets to tiff and using those. MapServer has to be compiled with Gdal 
and Grasslib (not in the standard binaries).


dr.J. Hartmann
Department of Geography
University of Amsterdam
j.l.h.hartmann at uva.nl

More information about the grass-user mailing list