TerraLib and TerraView Wiki Page

Tutorial TerraView

Installing

Go to TerraView and Download the last version. After installing it, double-click over TerraView icon to start it.

There are some data (*.zip) available for download from: vector and raster files

Unzip the * .zip files to a local directory (“C: \ TL5_data”) before using them. You can also use your own data.

Starting TerraView

After starting TerraView, check the main window and key concepts before adding layers to your project.

Adding Vector and Raster files

Project→Add Layer→Vector Files and browse to the directory “C:\TL5_data\shps”.

Select at least one *.shp (click on shift to select more) and click on Open.

Project→Add Layer→Raster Files and browse to the directory “C:\TL5_data\rasters”.

Select one *.tiff (click on shift to select more) and click on Open.

Alternatively, open the File Explorer and browse to the desired directory, select one or more files and drag and drop into the Layer Explorer.

Monospaced Text

Visualizing vector/attributes and raster files

In the Layer Explorer check the box beside the layer name and click on the draw button.

The visualization order is bottom-up. To see munic_2001 and Focos_Queimada_2008, they should be in this order from bottom to up in the layer tree.

To change the layer position in the Layer Explorer, righ-click→hold over the layer name and drag it up or down.

To see the Attribute Table associated with a vector file (polygons, lines or points), righ-click→Show Table over layer name.

Changing the Style of Polygons/Line/Point/Text or raster

In the Layer Explorer click on the right arrow “>” to access the default Layer' Style defined.

Then double-click over Style to open Style Explorer interface with the current style. Change the color, opacity, fill type, etc and draw again the layer.

The details can be found at Help→View Help… > TerraView GUI → Style Explorer

Saving the context in a Project

To save the context of your work in a TerraView Project, click on:

File→Save Project, browse to any local directory and type a project name.

The Project File records only the main information about each layer added to the project, such as data source, visualization style, spatial reference system (SRS).

Layer Properties

To check basic information about a layer, right-click on the name and choose Properties to see: title, srid, connection, number of items, bounding box coordinates, and Data Properties containing all attributes / type, including type geometry 1).

The most important information are also available as Tool Tip 2).

Main Concepts

Datasources

Data sources can be understood as places where you can find one or more data sets to use in one or more TerraView projects.

To add a data source to a TerraView application, go to:

Tools→ Datasource Manager → [On the Left choose one of the Datasources types 3)] → (+) and enter a Title for the data source and its connection parameters.

Examples:

Datasources4)Title5)Description
C:/myshapes/BR_munic.shp br_munic one shape file
C:/myshapes my_shp_dirLocal Directory of shapes
\\other-pc\shapes Other_pc_shps_dirDirectory of shapes in another PC accessible
C:/myrasters/cbers4/CBERS4_153.tifcbers153One raster file
C:/myrasters/cbers4my_raster_dirLocal Directory of rasters file
goes.dpi.inpe.br@pratica_celulas@amazonConn_PGIS_db_pratica_celulas Connection parameters needed to connect to a POSTGIS datasource6)
http://www.geoservicos.ibge.gov.br/geoserver/wfs Conn_wfs_geoserver WFS service Address
http://terrabrasilis.info/terraamazon/ows Conn_WCS_tbrasilis WCS Service Address
http://terrabrasilis.info/terraamazon/ows Conn_WMS_tbrasilis WMS service Address

You can now reference any dataset from the registered data sources. An internal file named datasources.xml holds all this information. Note that every time a layer is added to the project, its location is recorded in datasources.xml, if it is not already there. However when a layer is removed, its location is not removed from datasources.xml, as other projects may refer to it.

To access the registered Data Sources, go to:

Project→ Add Layer→ From Data Source→ [On the Left choose one of the Datasources types] →[On the Right select one of the available data sources] → Select

Project

A TerraView project can be seen as the user's working environment. A project organizes all layers used so far and keeps only relevant information in a file with <project_name>.tview extension.

Each time a project is saved, the datasources.xml file is also saved to register any new data sources that may have been added

1) To check the Data Properties values righ-click→Show Table over layer name
2) To check it, move the mouse over the layer name at the Layer Explorer and wait a bit to see the message
3) PostGIS, Raster Files, Vector files, WCS, WFC, WMS
4) Connection parameters
5) if title is empty, it assumes the Datasources
6) Ex:Host: goes.dpi.inpe.br or localhost (if your database is local);Port: 5432;User: xxxx ; PassW: xxxx;Database name: pratica_celulas