4.x Converter is
a tool used to convert data to TerraLib 5
model. It only supports
TerraLib databases generated by
TerraView 4.2.2. If the selected database is from a previous version, a
warning message will appear. In this case, firstly install
TerraView 4.2.2 and then open the database to perform the conversion to 4.2.2, then try to use this tool again.
IMPORTANT NOTE: If you have Microsoft Office 32-bit installed,
you need to install the new database engine called ACE
(AccessDataBaseEngine_x64), available for 64 bits, in order to access the new Microsoft Access file extension *.accdb.
However, a previous version of the database engine is already
installed together with Office 32-bit - called Microsoft Jet
database engine. To make both of them work together there is a
workaround explained in "Using TerraView 5 with Microsoft Access Database Files".
If you have Microsoft OFFICE 2013 64-bit installed, everything should work without any installation.
It is accessible through:
> TerraLib4 Converter...
This tool follows
a wizard standard in 7 steps to assist the conversion:
to a TerraLib4 Database (it is the same interface used to connect with a database in TerraLib4.x).
- The operation will be always Connect.
- Select the Database Type (Access). It is only implemented for Access.
- Inform the connection parameters (Host, Port, User, Password) if the database type is not Access)
- Select the Database... on version 4.2.2
- Press Next
- If the warning message "The database must be converted to the model 4.2.2" occur - press OK
- Press Cancel.
- Open this database under TerraView 4.2.2 to convert it to this version and them come back here.
- Layer Selection - Select
the Layers that will be converted to TerraLib 5.
- Under Layers List it is possible to Select All or Deselect All.
- Select All or at least one of them by checking the box.
- Press Next.
- Target Data Source - Select a data source to store the converted data.
- On the left, select one of the datasource manager: Microsoft Access, PostGis, Vector Filesm WFS, WCS) and:
- Select one of the Available Data Sources from the list and press NEXT or
- Create a new datasource and press NEXT. See the details for PostGIS datasource below.
- For PostGIS
inform all parameters at PostGIS Creator interface
and came back here.
- Select from Available Data Sources
the connection generated (ex: xxxx.dpi.inpe.br@my_db@postgres)
- Click on
to change Client Encoding from UTF8 to LATIN1 or CP1252, otherwise some
tables with caracters like ç, ã will not be converted and
a message will list those tables. These tables can be converted
afterwards, connecting again and changing Client Encoding.
- HINT: Click over the Password to get access to the Client Encoding list and then choose to LATIN1 or CP1252.
- Click OPEN.
- Target Raster Folder - This step is necessary only
when there is at least one raster layer to be converted.
Select a folder to store the raster layers as TIFF files.
- Click on to define where to store the raster layers as TIFF files.
- Press Next.
- Resolve/No Name Conflicts - Some layer name might crash
with layer names in the target data source. For those marked with it is necessary to change. The others can also have its names changed.
- Double-Click over the Target Name cell and enter the new name for all layers marked.
- Press Commit. After this step all layers are already available at the the target Data Source.
- Layer Creation - Select which Terralib4.x layers converted will be part of your current project in TerraLib5.
- Select All or some of them by checking the box to create a corresponding layer at your project - and a default Style.
- If Deselect All is chosen, the layers can be added afterwards as they are available at the target datasource.
- Press Next.
- Theme Creation - Select which Terralib4.x Themes of
converted Layers will be a layer in your current project in Terralib5,
with information like Visual and Grouping. Check the hint bellow before selection.
- Select All or some of them by checking the box.
- If Deselect All is chosen, the Themes will not be represented in your current project.
- Press Finish.
Hint: In TerraLib4.x the concept of Layer, View and
Theme are used. The same Layer can be represented in different Views as
and each View holds a specific Spatial Reference System (projection).
By default, all View/Themes are selected to be converted,
but it takes time
and in most cases it is not necessary as there are tools to handle
diferent projections. However, if you want to keep information
represented in a View, keep it checked.
In the table below the layer named "IBGE_Mun_55mu2500g" would generate
three layers into your project (at the Layer Explorer Tree) as the two last lines were
checked. One for each view/theme
(RADAM_TREES_Ori and 0BRASIL) checked and one for
the original layer selected at the step 6. These may
cause more than one layer with the same name in your Layer Explorer Tree. Also if a layer from
a view is selected, the visual caracteristics (color) are used to
define the style.
TerraView4.2.2 also allows you to keep more than one representation in
one layer. For example, a layer containting polygons and its centroids.
If such case occurs, the converter will consider only one representaton
in this order: Polygons, Lines, Points. Keep in mind that
centroids can be easy generated.
Alternativily, use TerraView-4.2.2 to export Layers which
more than one representing before conversion. In this case, it will be
generated one shapefile for each representation. These shapefiles
representing only one representation can be imported into
TerraView-4.2.2 and them converted, or added directed into your