Importing raster maps in GRASS location

Tags

, ,

GRASS stores data in the form of location and mapset. Location Wizard avaialble in Startup will allows to create your own location

Location

A location is defined by its coordinate system, map projection, datum and geographical boundaries. The subdirectories and files defining a location are created automatically when GRASS is started the first time with a new location. Different location have its own CRS defined by user.

Mapset

Each location can have any number of mapsets. A Mapset is a location’s subdirectory. A new mapset can be added at GRASS startup. A default mapset “PERMANENT” is automatically created when creating a new location.

Once the Location/Mapset is created you can import raster map using File Menu.

File -> Import raster data -> Coomon formats import [r.in.gdal]

raster-import

Import Tool

raster-import2

Importing data without knowing location information

The above method will only work if you are aware of the projection, datum and geographical extent of the data you have. If you only have data and need to import into GRASS for visualization and do further analysis, GRASS allows to create a new location from the metadata associated with the raster maps. For this you need to setup a arbitrary location xy using location wizard or open up a location in sample data available from here.

From GRASS shell  issue the command r.in.gdal which shows up a dialog shown below

r.in.gdal(required parameters)

r.in.gdal(required parameters)\

Specifying Optional Parameters

Optional parameters

Optional parameters

Results

Results

Results

Restarting GRASS into new Location

select newly created location “mylocation“. You can see a default mapset “PERMANENT” is created automatically

starting grass in new location

starting grass in new location

Your new map is already available in the mapset. You can view it using Layer Manager for visualization

Happy grassing

Installing GRASS GIS on Ubuntu

Tags

, , ,

GRASS GIS 7.0 is the current development (unstable) version in the GRASS GIS family. Here is a set of notes on how to build it from source on Ubuntu 12.04 LTS/ Linux Mint 15

Package Requirements

sudo apt-get -y install flex bison libfreetype6-dev
libnetcdf-dev libproj-dev libfftw-dev libreadline-dev
netcdf-bin liblapack-dev libwxgtk2.8-dev sqlite3
libpq-dev libavcodec-dev subversion libcairo2-dev

Get source code

svn checkout https://svn.osgeo.org/grass/grass/trunk grass_trunk

Minimal Install

./configure --with-freetype-includes=/usr/include/freetype2 --with-freetype
make
sudo make install

Full Install

If you wish to install GRASS with liblas support. You need to compile it manually and builds clean on ubuntu 12.04 LTS.

Download libLAS from OSGeo Download Site

http://download.osgeo.org/liblas/libLAS-1.7.0.tar.gz

Building libLAS

1. Untar the file
2. Run cmake
3. Install

tar -xzvf libLAS-1.7.0.tar.gz
cd libLAS
sudo apt-get install libboost-system-dev
libboost-program-options-dev libboost-thread-dev
cmake .
make
sudo make install

Configuring GRASS GIS with all options

./configure --with-freetype-includes=/usr/include/freetype2 \
--with-postgres-includes=/usr/include/postgresql \
--with-postgres --with-readline --with-nls --with-blas \
--with-lapack --with-wxwidgets --with-sqlite --with-geos \
--with-mysql-includes=/usr/include/mysql \
--with-mysql --with-netcdf --with-liblas --with-freetype
config

configuration summary

Building

Check your configuration settings and if you are satisfied you can build GRASS now.

make
build summary

build summary

Installing GRASS GIS

sudo make install

This will build and install GRASS under /usr/local/grass7.0svn. If you wish to install in a different location specify –prefix=/path/to/installdir

along with other configuration options

Happy grassing

Follow

Get every new post delivered to your Inbox.