TerraLib 4. Converter

TerraLib 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:  in order to access the new Microsoft Access file extension *.accdb, you have to install the new database engine called ACE (Access DataBase Engine), available for 64 bits.   If you have a 32-bit Office installed  (a previous version of the database engine is available -  Microsoft Jet database engine) there is a workaround to make then work together explained in "Using TerraView 5 with Microsoft Access Database Files".

It is accessible through:

    Tools > TerraLib4 Converter... 

This tool follows a wizard standard in 7 steps to assist the conversion:

  1. Connect to a TerraLib4 Database (it is the same interface used to connect with a database in TerraLib4.x).
                 
    1. The operation will be always  Connect.
    2. Select the Database Type  (Access). It is only implemented for Access.
    3. Inform the connection parameters (Host, Port, User, Password) if the database type is not Access)
    4. Select the Database... on version 4.2.2
    5. Press Next
      1. If the warning message "The database must be converted to the model 4.2.2"  occur -  press OK
      2. Press Cancel.  
      3. Open this database under TerraView 4.2.2 to convert it to this version and them come back here.
  1. Layer Selection - Select the Layers that will be converted to TerraLib 5.
    1. Under Layers List  it is possible to Select All or Deselect All.
    2. Select All or at least one of them by checking the box. 
    3. Press Next.
  2. Target Data Source -  Select a data source to store the converted data  (Data Source Selector).
    1. Select one of the Available Data Sources  from the list (or create a new one).
    2. Press Next.
  3. 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.
    1. Click on folder icon to define where to store the raster layers as TIFF files.
    2. Press Next.
  4. 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.
    1. Double-Click over the Target Name cell and enter the new name for all layers marked.
    2. Press Commit. After this step all layers are already available at the the target Data Source. 
  5. Layer Creation - Select which Terralib4.x layers converted will be part of your current project in TerraLib5.
    1. Select All or some of them by checking the box to create a corresponding layer at your project. 
    2. If Deselect All is chosen, the layers can be added afterwards as they are available at the target datasource. 
    3. Press Next.
  6. 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.
    1. Select All or some of them by checking the box.  
    2. If Deselect All is chosen, the Themes will not be represented  in your current project.
    3. 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 themes, and each view holds a specific Spatial Reference System (projection).  By default all of them are selected, but it takes time and in most cases it is not necessary as there are tools to handle the SRS. 

In the table, the same input layer "IBGE_Mun_55mu2500g" would generate three layers in your current project if the two last lines were checked. One for each view (RADAM_TREES_Ori and 0BRASIL) and one for the original layer selected at the step 6.  These may cause more than 1 layer with the same name.  Also if a layer from a view is selected,  the visual caracteristics (color) are used to define the style.