User Tools

Site Tools


wiki:grasscreatelocation

GRASS70 Create Location using ancillary layer

Create a location in a new grass database using a referenced dataset.

Create a new GrassDataBase and copy the input.tif

rm -rf ~/ost4sem/grassdbnew/
mkdir ~/ost4sem/grassdbnew/
cp ~/ost4sem/exercise/basic_adv_gdalogr/input.tif ~/ost4sem/grassdbnew/input.tif

Define a projection to the input.tif

cd ~/ost4sem/grassdbnew/
gdalwarp   -t_srs EPSG:4326  -s_srs EPSG:4326  input.tif input_proj.tif

Run the grass70 command which create the newlocation based on the input_proj.tif

rm -rf ~/ost4sem/grassdbnew/newlocation
grass72 -text -c input_proj.tif newlocation ~/ost4sem/grassdbnew 
r.in.gdal input=input_proj.tif  output=input_proj

import the date

for file in *.tif 
filename=$(basename $file .tif)
r.in.gdal input=$file.tif  output=$file
done

from csv to shapefile

pkascii2ogr  

import the shapefile

v.in.ogr 
r.stream.snap 
wiki/grasscreatelocation.txt · Last modified: 2018/04/05 16:32 (external edit)