Importing raster maps in GRASS location


, ,

GRASS stores data in the form of location and mapset. Location Wizard avaialble in Startup will allows to create your own 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.


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 []


Import Tool


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 which shows up a dialog shown below parameters) parameters)\

Specifying Optional Parameters

Optional parameters

Optional parameters




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


, , ,

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 grass_trunk

Minimal Install

./configure --with-freetype-includes=/usr/include/freetype2 --with-freetype
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

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 .
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

configuration summary


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

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


Get every new post delivered to your Inbox.