jgrass workshop: introduction to jgrass

Download JGrass Workshop: Introduction to JGrass

If you can't read please download the document

Upload: andrea-antonello

Post on 16-Apr-2017

2.269 views

Category:

Technology


0 download

TRANSCRIPT

GETTING STARTED WITH JGRASS & GIS

Silvia FranceschiAndrea Antonello

FOSS4G WORKSHOP 2008-10-03

INSTALLATION

JGrass is a Java based Free and Open Source GIS. It is multiplatfom:

windows

linux

macOSX

You can download JGrass for free at:

www.jgrass.org

Two types of installation

branded JGrass version

udig plugin

JGRASS BRANDED VERSION INSTALLATION

The complete branded version of JGrass is released only for special events or specific projects

JGrass_foss4g

Installation is easy, simply double click on the executable and follow the NNNI (next-next-next-installation) instructions.

The complete branded version of JGrass for the Windows OS contains also the GRASS executables needed by JGrass to run GRASS commands.

INSTALLATION AS A uDig PLUGIN

JGrass as a plugin can be installed only after uDig installation.

download uDig at http://udig.refractions.net/download/

install uDig following the instruction in the Walk through

select from the menu Help -> Find and Install...

INSTALLATION AS A uDig PLUGIN

Select to install new functionalities and go on with the wizard.Select JGrass as the new functionality to install.

INSTALLATION AS A uDig PLUGIN

INSTALLATION AS A uDig PLUGIN

INSTALLATION AS A uDig PLUGIN

INSTALLATION AS A uDig PLUGIN

INSTALLATION AS A uDig PLUGIN

INSTALLATION AS A uDig PLUGIN

Installation of JGrass plugin in uDig adds three new menus to the menu bar:

HortonMachine

JGrass

GRASS

INSTALLATION AS A uDig PLUGIN

Installation of JGrass plugin in uDig adds three new menus to the menu bar:

HortonMachine

JGrass

GRASS

And two new icons in the toolbar

opening the scripting editor

active region definition

GUI DESCRIPTION

PROJECT VIEW

GUI DESCRIPTION

LAYERS VIEW

GUI DESCRIPTION

MAP VIEW

GUI DESCRIPTION

CATALOG AND ATTRIBUTE TABLE

DATA VISUALIZATION

In JGrass-uDig it is possible to visualize georeferenced RASTER and VECTOR data.

Vector data are completely supported by uDig itself.

More info about this tools are available from the uDig website:

http://udig.refractions.net/confluence/display/EN/Walkthrough+1http://udig.refractions.net/confluence/display/EN/Walkthrough+2

For raster data there are some functionalities of uDig (essentially display images) and some others introduced by JGrass.

CREATION OF A NEW PROJECT

The creation of a new project in uDig is automatic when importing a new layer, in any case we suggest to create a new project ad hoc for the data you are importing to keep all the information coherent and ordered.

CREATION OF A NEW PROJECT

name of the new project

CREATION OF A NEW PROJECT

path in which to save the project

OVERVIEW FOR DATA VISUALIZATION

uDig and JGrass work following the idea of Drag&Drop: every kind of data can be visualized simply drag the file into the program.

It is possible to drag the file from the Explore of the operating system to one of these view:

Catalog: the layer will be added to the catalog but not visualized

Map: the layer will be directly visualized and added on top of the visualized layers

Layers: the new layer is added exactly in the point the user drop it

Project: the layer is added to the opened project

OVERVIEW OF VECTOR DATA VISUALIZATION

Shapefile visualization refers to the .shp file of the shapefile files bundle (shx, prj, dbf).

select a shapefile in the operating system's Explorer and drag it to the Catalog of JGrass

right-click the item in the catalog and select in the pop-up menu the entry: add to new map

alternatively you can also just drag & drop the entry onto the map

INSTALLATION AS A uDig PLUGIN

In the same way as JGrass it is possible to install also Axios extension as a uDig plugin.

Axios tools add some CAD capabilities to the basis GIS software. It consists in some tools for editing and management of vector data (shapefile).

These new capabilities are:

spatial operations: buffer, clip, dissolve, intersect and spatial join

editing tools: arc, merge, modes for create geometry, split and trim

OVERVIEW FOR VECTOR DATA

OVERVIEW FOR VECTOR DATA

OVERVIEW FOR VECTOR DATA

OVERVIEW FOR VECTOR DATA

OVERVIEW FOR VECTOR DATA

move layer on top and below other layers

editing of visualization style

highlight of the selected layer in the map

zoom to the extend of the selected layer

OVERVIEW FOR VECTOR DATA

feature selection tools

information tools

feature layer editing tools

OVERVIEW FOR VECTOR DATA

map navigation tools

zooming e panning

OVERVIEW FOR VECTOR DATA

Image based raster data (as TIFF, JPG) can be visualized in JGrass-Udig the same way as explained for vector data before.

Anyway, this type of data is not editable inside of the application, but only usable as base cartography.

OVERVIEW OF RASTER DATA

OVERVIEW OF RASTER DATA

JGRASS: RASTER DATA ANALYSIS

In JGrass raster data targetted for raster analysis have to be organised following a particular logic, which can be summarized in the following schema:

DATABASE: a working folder on the hard disk of the pc inside which all the data handled by JGrass are kept

LOCATION: a folder inside the DATABASE folder inside which the information of the projection is held

MAPSET: again a folder inside a LOCATION folder, it represents the main working environment inside which the maps are really held

JGRASS: RASTER DATA ANALYSIS

The data structure of Jgrass data is completely tranparent to the user and handled by the application. The user only has to define the folder that is ment to represent the DATABASE and the name of the LOCATIONS AND MAPSETS as they are created.The creation of a new location occurrs through the menu:File -> New -> Other

JGRASS: RASTER DATA ANALYSIS

JGRASS: RASTER DATA ANALYSIS

Path to the JGrass DATABASE

JGRASS: RASTER DATA ANALYSIS

Name of the new LOCATION to create

JGRASS: RASTER DATA ANALYSIS

Selection of the Coordinate Reference System

JGRASS: RASTER DATA ANALYSIS

JGRASS: RASTER DATA ANALYSIS

JGRASS: RASTER DATA ANALYSIS

Definition of the new MAPSET

Click here to add a new mapset

JGRASS: RASTER DATA ANALYSIS

Drag and drop the file with extention *.jgrass that was created inside the new LOCATION into the Catalog of JGrass

JGRASS: RASTER DATA ANALYSIS

JGRASS: RASTER DATA ANALYSIS

Data types that are directly importable into JGrass

JGRASS: RASTER DATA ANALYSIS

Reset does a refresh on the list of maps available inside the Mapset visible in the Catalog

JGRASS: RASTER DATA ANALYSIS

To visualize the data of the MAPSET it is recommended to create a new Map, in order to properly handle the projection information.Currently JGrass rasters do not support on-the-fly reprojection, so the Map projection has to be the proper one. This does not apply for example to vector data, which are reprojected quickly.

We are currently working on on-the-fly reprojection support in JGrass.

Right-click on the name of the map and select from the pop-up menu the option Add to new map.

JGRASS: RASTER DATA ANALYSIS

JGRASS: RASTER DATA ANALYSIS

A very important concept for doing raster analysis is that of the Active Region or Working Region.The Active Region represents the portion of territory inside which all the calculations occur, i.e. the region on which the GRASS-JGrass algorithms will work.

To visualize the Active Region just drag it onto the Map View taking it from:

Catalog -> Map Graphics -> Active Region Graphic

JGRASS: RASTER DATA ANALYSIS

A very important concept for doing raster analysis is that of the Active Region or Working Region.The Active Region represents the portion of territory inside which all the calculations occur, i.e. the region on which the GRASS-JGrass algorithms will work.

To visualize the Active Region just drag it onto the Map View taking it from:

Catalog -> Map Graphics -> Active Region Graphic

JGRASS: RASTER DATA ANALYSIS

Since in the Catalog more than one LOCATION can be visualized and for a single LOCATION more than one MAPSET can be available, it is necessary to select the MAPSET on which the application is supposed to work (it is the MAPSET that holds the information of the Active Region).

JGRASS: RASTER DATA ANALYSIS

The Active Region is visualized with its defaut settings, which is a a white area inside a green layer.All the analyses that are done with JGrass-GRASS commands are applied only to the Active Region and with the resolution of the Active Region. This means that if you do not have data inside the white area or if all the data are covered by the green region, they will not be used by the algorithms

JGRASS: RASTER DATA ANALYSIS

JGRASS: RASTER DATA ANALYSIS

The Active Region can be modified and configured in two different ways:

once, the Active Region layer has been selected, through the style layer configuration button, placed on the top of the layer view

through the Active Region icon placed in the main toolbar: In this case the user is able to quickly change the boundaries of the Active Region, but for example not the resolution.

JGRASS: RASTER DATA ANALYSIS

JGRASS: RASTER DATA ANALYSIS

JGRASS: RASTER DATA ANALYSIS

Click on the apply button twice!!!!

JGRASS: RASTER DATA ANALYSIS

JGRASS: SETTING THE WORKING ENVIRONMENT

For the proper execution of commands, JGrass needs the definition of two important settings:

The working MAPSET: that is the MAPSET that contains the data that will be analyzed (-> the Active Region that will be used by the commands is the one hold by the chosen MAPSET)

the path to the GRASS commands: this information is not mandatory if you plan to use only JGrass commands, but is necessary to be able to use GRASS commands. For this foss4g windows version we bundled GRASS in the installation folder of the application, so that is the path that has to be supplied. In any other case, as for example for linux or macos systems, that path represents the installation folder of GRASS on the pc.

JGRASS: SETTING THE WORKING ENVIRONMENT

JGRASS: GENERAL COMMANDS

Click to edit the title text format

Autore/i

ydroloGIS

nvironmental

ngineering

HydroloGIS s.r.l. - Via Siemens, 19 39100 Bolzano

www.hydrologis.com

Click to edit the title text format

Click to edit the outline text format

Second Outline Level

Third Outline Level

Fourth Outline Level

Fifth Outline Level

Sixth Outline Level

Seventh Outline Level

Eighth Outline Level

Ninth Outline Level

ydroloGIS

nvironmental

ngineering

HydroloGIS s.r.l. - Via Siemens, 19 39100 Bolzano

www.hydrologis.com