[GRASS-user] what is requried when import data to grass?

Micha Silver micha at arava.co.il
Sun Jun 14 03:54:15 EDT 2009


maven apache wrote:

>
>     I don't recall the start of your thread:  
>
>  
>
>     Are you saying that you need to be able to handle any data that
>     clients throw at you in *any* CRS?  
>
>     How will you know the CRS of the client's maps? (Many data formats
>     do not require full metadata with CRS information)
>
>  
> In fact I perfer to create location and mapset for each requested map 
> according the crs or other parameter, and how to get the parameter is 
> another topic( for some ogc web servcie wcs wms we can get most 
> paramter from the requsted url for example:
> http://localhost:8080/wcs?Request=wcs&identifier=imageID&crs=EPSG:4326&bbox=[][]$format=tiff 
> <http://localhost:8080/wcs?Request=wcs&identifier=imageID&crs=EPSG:4326&bbox=%5B%5D%5B%5D$format=tiff>.....)
> So what block me is the location and mapset, in a word I am so 
> unfamiliar with the grass although I have read some documents that I 
> can not confignation as the pywps did.
>
>
Here's a test script that I can run (pretty much copied from the wiki  
http://grass.osgeo.org/wiki/GRASS_and_Shell )  It requires GRASS 6.4.

#!/bin/bash
# Example in bash shell syntax:
# path to GRASS binaries and libraries:
export GISBASE=/usr/local/grass64/grass-6.4.0RC4/
export PATH=$PATH:$GISBASE/bin:$GISBASE/scripts
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GISBASE/lib
# use process ID (PID) as lock file number:
export GIS_LOCK=$$
# path to GRASS settings file
export GISRC=$HOME/.grassrc6
export GISDBASE=$HOME/geodata/grass
export LOCATION_NAME=testloc
export MAPSET=testmap

####################
# Here is my stuff
# Create new location and mapset in EPSG:2039 CRS
g.proj -c loc=$LOCATION_NAME epsg=2039
g.mapset -c --quiet map=$MAPSET loc=$LOCATION_NAME gisdbase=$GISDBASE
echo "200000,500000" | v.in.ascii out=testpoint fs=, --quiet
v.info testpoint
#######################

#run GRASS' cleanup routine
$GISBASE/etc/clean_temp
# remove session tmp directory:
rm -rf /tmp/grass6-$USER-$GIS_LOCK


HTH,




More information about the grass-user mailing list