						TerraLib Examples

Each one of the items below corresponds to a directory that contains the files that
implement the operations described, as well as the project files (*.dsw, *.dsp) for
the Microsoft Visual C++, and the Makefiles to compile the files in the Linux/Unix
operational system. The data used in these examples can be found in the "data"
directory.

1. createDatabase
It illustrates how to create a TerraLib database, creating all of the tables that
make up the TerraLib data model.

2. createLayer
It illustrates how to create a layer with vector data in memory and save it in a
TerraLib database already created.

3. createTable
It illustrates how to create an attribute table in memory and save it in a TerraLib
database already created.

4. importMIDMIF
It illustrates how to import a vector data file in the MapInfo format(MID/MIF)for a
TerraLib database already created.
Source Data: Distritos.mid, Distritos.mif

5. importShape
It illustrates how to import a vector data file in the Shapefile format for a TerraLib
database already created.
Source Data: EstadosBrasil.shp, EstadosBrasil.shx, EstadosBrasil.dbf

6. importDBF
It illustrates how to import an attribute table in the DBF format as an external table
for a TerraLib database already created.
Source Data: SOCEC.dbf

7. importJPEG
It illustrates how to import an image in the JPEG format for a TerraLib database already
created.
Source Data: sampa.jpg

8. copyLayer
It illustrates how to copy a layer of a TerraLib database changing the projection of its
geometries.
It depends on the layer created in the item 4 (importMIDMIF)

9. importGeoTab
It illustrates how to import a vector data file in the SPRING format for a TerraLib
database already created.
Source Data: Cadastro_Escolas.geo, Cadastro_Escolas.tab

10. convertCoordinates
It illustrates how to use the TeProjection class to make the conversion between two
different projections.

11. databaseQuery
It illustrates how to use the TeDatabase class to submit queries on geometries tables
of a TerraLib database.
It depends on the layer created in the item 4 (importMIDMIF)

12. databaseSQLQuery
It illustrates how to query geometries tables through explicit SQL queries on a TerraLib
database.
It depends on the layer created in the item 4 (importMIDMIF)

13. spatialQuery
It illustrates how to make spatial queries on the layers of a TerraLib database.
Source Data: cities.shp/shx/dbf, rivers.shp/shx/dbf, states.shp/shx/dbf

14. addGeomRepresentation
It illustrates how to add a point representation (centroids) to a layer with polygon
representation.
It depends on the layer created in the item 4 (importMIDMIF)

15. createTheme
It illustrates how to create views and themes from layers of a Terralib database,
without restriction and with restriction on its attributes.
It depends on the layer created in the item 4 (importMIDMIF)

16. themeGrouping
It illustrates how to create a grouping on a theme created in a TerraLib database.
It depends on the theme created in the item 15 (createTheme)

17. createSTElementSet
It illustrates how to create a Spatial Temporal Element Set, out of a theme created
in a TerraLib database.
It depends on the theme created in the item 15 (createTheme)

18. mosaicTIFFImages
It illustrates how to import to TIFF files to the same layer in a TerraLib database, 
generating a mosaic of images.
It depends on the files nat1.tif and nat2.tif.

19. importCSV
It illustrates how to import a MIF / MIF file to a new layer in a TerraLib database
and how to import a second attribute table from a CSV file.
It depends on the files RecifeBairros.MIF RecifeBairros.MID and RecifeBairros2.csv
